jUnit/Junit Mcq Question Set 3 Sample Test,Sample questions

Question:
 The _____________ is the list of work the Development Team must address during the next Sprint.

1.Sprint Review

2.Sprint Backlog

3.Product Increment

4. Product backlog


Question:
anyObject() expects any double argument.

1.True

2.False

3.all of the above

4.none of the above


Question:
By default, a mock is thread safe.

1.True

2.False

3.all of the above

4.none of the above


Question:
createMock(String name, Class<T> toMock) throws ______ exception.

1.IndexOutOfBounds

2.IllegalArgumentException

3.NullPointer

4.Arithmetic


Question:
EasyMock instantiates an object based on an interface or class.

1.True

2.False

3.all of the above

4.none of the above


Question:
EasyMock relies heavily on the _______import feature of Java.

1.Dynamic

2. Static

3.Class

4.Object


Question:
The Executor implementations provided implement ____________ which is a more extensive interface.

1.ExecutorService

2.ThreadPoolExecutor

3.ArrayDeque

4.SerialExecutor


Question:
The ______ interface decides whether an actual argument is accepted.

1. IMockBuilder<T>

2.IMocker<T>

3.IBuilder<T>expect(T value)

4.IArgumentMatcher


Question:
The __________ interface allows setting expectations for an associated expected invocation.

1.IMocksControl

2.IExpectationSetters<T>

3. IExpectation<T>

4. Isetters<T>


Question:
The ____________ interface is used in the creation of partial mocks with EasyMock.

1.IMockBuilder<T>

2. IMocker<T>

3.IBuilder<T>expect(T value)

4.MockBuilder<T>


Question:
To use the createMock method of EasyMock we need to import ______

1.org.easymock.EasyMock.createMock

2.org.EasyMock.createMock

3.org.easymock.createMock

4. org.createMock


Question:
When we’re talking about mock objects, a/an _________ is a feature built into the mock that verifies whether the external class calling this mock has the correct behavior.

1.Expectation

2.Explanation

3.Behavior

4.Amorous


Question:
_____ class is an Executor that executes commands on the thread that calls runPendingCommands or runUntilIdle.

1.Blitzer

2. DeterministicExecutor

3. DeterministicScheduler

4.Synchroniser


Question:
_____ creates a mock object that implements the given interface with the specification is that order checking is disabled by default.

1.createMock(Class<T> toMock)

2.createMock(MockType type, Class<T>toMock)

3.createMock(String name, Class<T> toMock)

4.createMock(String name, MockType type, Class<T> toMock)


Question:
_____ expect the last invocation a specified number of times.

1.times(int count)

2. times(int min, int max)

3. once()

4. asStub()


Question:
_____ returns the expectation setter for the last expected invocation in the current thread.

1.createControl()

2.createControl(MockType type)

3.createNiceControl()

4.expect(T value)


Question:
_____ sets a return value that will be returned for the expected invocation.

1.andReturn(T value)

2.times(int min, int max)

3.once()

4.asStub()


Question:
______ check if an attribute value is true or not.

1.BaseIfAttribute

2.IfBlankAttribute

3.IfTrueAttribute

4.IfSetAttribute


Question:
______ checks if an attribute is blank or not.

1.BaseIfAttribute

2.IfBlankAttribute

3.IfTrueAttribute

4.IfSetAttribute


Question:
______ class is used for assembling the constants declared in a Java class in key1=value1(line separator)key2=value2 format.

1.ClassConstants

2.BaseFilterReader

3.BaseParamFilterReader

4.ChainableReader


Question:
______ contains classes to help test concurrent code with jMock.

1.org.jmock.concurrent

2. org.jmock.syntax

3. org.jmock.lib

4.org.jmock.integration.junit3


Question:
______ contains implementations of the core interfaces that are used to adjust or extend jMock’s basic functionality.

1.org.jmock

2. org.jmock.api

3.org.jmock.lib

4.org.jmock.integration.junit3


Question:
______ creates a mock builder allowing to create a partial mock for the given class or interface.

1.createMockBuilder(Class<T> toMock)

2.createMock(Class<T> toMock)

3.createNiceControl()

4.createNiceMock(Class<T> toMock)


Question:
______ Exception is thrown to report that a DeterministicScheduler has been asked to perform a blocking wait, which is not supported.

1.UnsupportedSynchronousOperationException

2.ArrayIndexOutOfBounds

3.StringIndexoutOfBounds

4.Arithmetic


Question:
______ expects a comparable argument greater than or equal the given value.

1.anyObject()

2.anyString()

3.geq(Comparable<T> value)

4.anyDouble()


Question:
______ expects the last invocation once.

1.andVoid()

2. times(int min, int max)

3.once()

4.asStub()


Question:
______ function expect the last invocation any times.

1.andStubReturn(T value)

2.andThrow(Throwable throwable)

3.anyTimes()

4.asStub()


Question:
______ is a ThreadingPolicy that makes the Mockery thread-safe and helps tests synchronize with background threads.

1.Blitzer

2. DeterministicExecutor

3. DeterministicScheduler

4.Synchroniser


Question:
______ is an interface indicating that a reader may be chained to another one.

1.TokenFilter.Filter

2.BaseFilterReader

3.BaseParamFilterReader

4. ChainableReader


Question:
______ is used for the creation of a mock object, with the specification of it being of the requested type, which has implementations of the given interface or extends the given class.

1.createMock(Class<T> toMock)

2.createMock(MockType type, Class<T> toMock)

3. createMock(String name, Class<T>toMock)

4.createMock(String name, MockType type, Class<T>toMock)


Question:
______ method creates a mock object that implements the given interface, order checking is enabled by default.

1.createNiceControl

2.createMockBuilder

3.createNiceMock

4.createStrictMock


Question:
______ reads the first n lines of a stream.

1.ClassConstants

2.HeadFilter

3.BaseParamFilterReader

4.FixCrLfFilter


Question:
______ reports an argument matcher.

1.newCapture()

2.makeThreadSafe()

3. reportMatcher(IArgumentMatcher matcher)

4.createNiceMock(Class<T> toMock)


Question:
______ sets stub behavior for the expected invocation.

1. andStubReturn(T value)

2.andThrow(Throwable throwable)

3.anyTimes()

4.asStub()


Question:
_______ converts text to local OS formatting conventions along with repairing the text damaged by file transfer programs.

1.ClassConstants

2.BaseFilterReader

3.BaseParamFilterReader

4.FixCrLfFilter


Question:
_______ Interface objects executes submitted Runnable tasks.

1.Executor

2.Execution

3. Runner

4.RunWith


Question:
_______ is a “Single-check” Target executor implementation.

1.SingleCheckExecutor

2.DefaultExecutor

3.ProjectHelperImpl

4.ProjectHelper2


Question:
_______ is a Sax2 based project reader.

1.AntXMLContext

2.DefaultExecutor

3.ProjectHelperImpl

4.ProjectHelper2


Question:
_______ is a ScheduledExecutorService that executes commands on the thread that calls runNextPendingCommand, runUntilIdle or tick.

1.Blitzer

2.DeterministicExecutor

3.DeterministicScheduler

4.Synchroniser


Question:
_______ records a call but returns nothing.

1.andVoid()

2. times(int min, int max)

3.once()

4.asStub()


Question:
________ create a new capture instance that will keep only the last captured value.

1.newCapture()

2. makeThreadSafe()

3.createNiceControl()

4. createNiceMock(Class<T> toMock)


Question:
________ expect the last invocation between min and max times.

1. times(int count)

2.times(int min, int max)

3. once()

4.asStub()


Question:
________ integrates jMock with JUnit 3.

1.org.jmock

2.org.jmock.api

3.org.jmock.lib

4. org.jmock.integration.junit3


Question:
________ is a class that “blitzes” an object by calling it many times, from multiple threads.

1.Blitzer

2. DeterministicExecutor

3.DeterministicScheduler

4.Synchroniser


Question:
________ is a parameterized base class for core filter readers.

1.TokenFilter.Filter

2. BaseFilterReader

3.BaseParamFilterReader

4.ChainableReader


Question:
________ is the base class for core filter readers.

1. TokenFilter.Filter

2.BaseFilterReader

3.BaseParamFilterReader

4.ChainableReader


Question:
________ sets a stub object that will be used for the calculation of the answer for the expected invocation.

1.andAnswer(IAnswer<? extends T>answer)

2.andDelegateTo(Object delegateTo)

3.andStubAnswer(IAnswer<? extends T> answer)

4.andThrow(Throwable throwable)


Question:
_________ creates a control of the requested type.

1. createControl()

2.createControl(MockType type)

3.createNiceControl()

4. createNiceMock(Class<T> toMock)


Question:
__________ sets a stub object implementing the same interface as the mock.

1.andAnswer(IAnswer<? extends T> answer)

2.andDelegateTo(Object delegateTo)

3.andStubAnswer(IAnswer<? extends T> answer)

4.andStubDelegateTo(Object delegateTo)


Question:
___________ creates a mock object, of the requested type and name which are passed, which also has implementations of the given interface or extends the given class.

1.createMock(Class <T> toMock)

2.createMock(MockType type, Class<T> toMock)

3.createMock(String name, Class<T> toMock)

4.createMock(String name, MockType type, Class<T> toMock)


More MCQS

  1. Junit Mcq Question Set 1
  2. Junit Mcq Question Set 2
  3. Junit Mcq Question Set 3
  4. Junit Mcq Question Set 4
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!