input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isLinkFoundTrue ( ) { final java . lang . String linkName = "linkName" ; final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDeviceOperation amqpsSessionDeviceOperation = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionDev... | org . junit . Assert . assertTrue ( isFound ) |
testGetMDCValue ( ) { org . terasoluna . gfw . security . web . logging . UserIdMDCPutFilter mdcPutFilter = new org . terasoluna . gfw . security . web . logging . UserIdMDCPutFilter ( ) ; java . lang . String userName = "terasoluna@nttd.co.jp" ; securityContext = mock ( org . springframework . security . core . contex... | org . junit . Assert . assertThat ( mdcValueStr , org . hamcrest . CoreMatchers . is ( userName ) ) |
testCAS ( ) { net . openhft . lang . io . Bytes bytes = net . openhft . lang . io . ByteBufferBytes . wrap ( java . nio . ByteBuffer . allocate ( 100 ) ) ; bytes . compareAndSwapLong ( 0 , 0L , 1L ) ; "<AssertPlaceHolder>" ; } readLong ( long ) { return getChronicleUnsafe ( ) . getLong ( ( ( start ) + offset ) ) ; } | org . junit . Assert . assertEquals ( 1L , bytes . readLong ( 0 ) ) |
size ( ) { int size = 100 ; byte [ ] bytes = new byte [ size ] ; random . nextBytes ( bytes ) ; java . lang . Object object = new java . lang . Object ( ) ; doReturn ( null ) . when ( pointerMap ) . get ( object ) ; doReturn ( pointer ) . when ( bufferStore ) . store ( bytes ) ; doReturn ( bytes ) . when ( serializer )... | org . junit . Assert . assertEquals ( 1 , cache . size ( ) ) |
testAddPageLabel ( ) { org . apache . fop . pdf . PDFDocument pdfDoc = mock ( org . apache . fop . pdf . PDFDocument . class ) ; org . apache . fop . pdf . PDFPageLabels pageLabels = new org . apache . fop . pdf . PDFPageLabels ( ) ; pageLabels . setDocument ( pdfDoc ) ; int index = 0 ; java . lang . StringBuilder expe... | org . junit . Assert . assertEquals ( expected . toString ( ) , baos . toString ( ) ) |
testHttpAbsoluteOtherFile ( ) { java . lang . String baseUri = "http://schemas.opengis.net/gml/3.2.1/gml.xsd" ; java . lang . String location = "file:///C:/Test/gml/3.2.1/feature.xsd" ; java . lang . String expected = location ; eu . esdihumboldt . hale . io . xsd . reader . internal . HumboldtURIResolver resolver = ne... | org . junit . Assert . assertEquals ( expected , source . getSystemId ( ) ) |
testCreateUser ( ) { final org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo user = org . feuyeux . jaxrs2 . atup . core . fake . CreateUser . buildUserInfo ( ) ; final javax . ws . rs . client . Entity < org . feuyeux . jaxrs2 . atup . core . info . AtupUserInfo > e = javax . ws . rs . client . Entity . entit... | org . junit . Assert . assertEquals ( user . getUserName ( ) , result . getUserName ( ) ) |
shouldConvertNullToTypeValue ( ) { final uk . gov . gchq . gaffer . types . function . ToTypeValue function = new uk . gov . gchq . gaffer . types . function . ToTypeValue ( ) ; final java . lang . Object value = null ; final uk . gov . gchq . gaffer . types . TypeValue result = function . apply ( value ) ; "<AssertPla... | org . junit . Assert . assertEquals ( new uk . gov . gchq . gaffer . types . TypeValue ( null , null ) , result ) |
testLeitorRequisicaoNull ( ) { try { new br . com . senacrs . alp . aulas . trabalho12 . LeitorRequisicao ( null ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IllegalArgumentException e ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertTrue ( true ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . polls . model . PollsQuestion . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com .... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testGetCodeBlockSimpleEnum ( ) { setName ( cls , "MyEnum" ) ; setEnum ( cls , true ) ; java . lang . String expected = "" + ( ( "enum<sp>MyEnum<sp>{\n" + "\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } getCodeBlock ( ) { return getModelWriter ( ) . writeParameter ( this ) . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , cls . getCodeBlock ( ) ) |
givenStringEvent_whenEventHandled_thenSuccess ( ) { listener . resetEventsHandled ( ) ; eventBus . post ( "String<sp>Event" ) ; "<AssertPlaceHolder>" ; } getEventsHandled ( ) { return org . baeldung . guava . EventListener . eventsHandled ; } | org . junit . Assert . assertEquals ( 1 , listener . getEventsHandled ( ) ) |
canListBatchAIUsages ( ) { java . util . List < com . microsoft . azure . management . batchai . BatchAIUsage > usages = batchAIManager . usages ( ) . listByRegion ( Region . EUROPE_WEST ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; } | org . junit . Assert . assertTrue ( ( ( usages . size ( ) ) > 0 ) ) |
testReadChannelFail ( ) { java . lang . String blobName = "test-read-channel-blob-fail" ; com . google . cloud . storage . BlobInfo blob = com . google . cloud . storage . BlobInfo . newBuilder ( com . google . cloud . storage . it . ITStorageTest . BUCKET , blobName ) . build ( ) ; com . google . cloud . storage . Blo... | org . junit . Assert . assertNotNull ( remoteBlob ) |
getResolvedRelativeResourceURI ( ) { final org . obeonetwork . m2doc . genconf . Generation generation = GenconfPackage . eINSTANCE . getGenconfFactory ( ) . createGeneration ( ) ; final org . eclipse . emf . ecore . resource . Resource resource = new org . eclipse . emf . ecore . resource . impl . ResourceImpl ( org .... | org . junit . Assert . assertEquals ( "test" , uri . toString ( ) ) |
testEvaluateEmptyDasharray ( ) { org . geotools . filter . function . FilterFunction_listMultiply func = ( ( org . geotools . filter . function . FilterFunction_listMultiply ) ( ff . function ( "listMultiply" , ff . literal ( 2.5 ) , ff . literal ( "" ) ) ) ) ; java . lang . Object evaluate = func . evaluate ( null ) ;... | org . junit . Assert . assertNull ( evaluate ) |
testEqualsSuper ( ) { org . o3project . odenos . core . component . network . flow . basic . FlowActionOutput obj = org . mockito . Mockito . spy ( new org . o3project . odenos . core . component . network . flow . basic . FlowActionOutput ( ) ) ; when ( obj . getType ( ) ) . thenReturn ( "aaa" ) ; "<AssertPlaceHolder>... | org . junit . Assert . assertThat ( target . equals ( obj ) , org . hamcrest . CoreMatchers . is ( false ) ) |
shouldSaveEntities ( ) { org . hivedb . hibernate . simplified . DataAccessObject < org . hivedb . util . database . test . WeatherReport , java . lang . Integer > dao = new org . hivedb . hibernate . simplified . ErrorCorrectingDataAccessObject < org . hivedb . util . database . test . WeatherReport , java . lang . In... | org . junit . Assert . assertEquals ( original , fetched ) |
testPreviousValueBeforeStart ( ) { org . roaringbitmap . buffer . MappeableContainer container = new org . roaringbitmap . buffer . MappeableArrayContainer ( java . nio . ShortBuffer . wrap ( new short [ ] { 10 , 20 , 30 } ) , 3 ) ; "<AssertPlaceHolder>" ; } previousValue ( int ) { short key = highbits ( fromValue ) ; ... | org . junit . Assert . assertEquals ( ( - 1 ) , container . previousValue ( ( ( short ) ( 5 ) ) ) ) |
testJitComparableNoGeneric ( ) { java . lang . String str = ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . compiler . integrationtests . Misc2Test . ComparableInteger . class . getCanonicalName ( ) ) ) + "\n" ) + "\n" ) + "rule<sp>\"minCost\"\n" ) + "when\n" ) + "<sp>$a<sp>:<sp>ComparableInteger()\n" ) + "<sp>Comparab... | org . junit . Assert . assertEquals ( 1 , ksession . fireAllRules ( ) ) |
deveObterIEUnicaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setInscricaoEstadualUnica ( "654... | org . junit . Assert . assertEquals ( "654321" , retorno . getInscricaoEstadualUnica ( ) ) |
testComment2 ( ) { javax . xml . stream . XMLEventReader reader = createXmlEventReader ( "<!--james-->" , new org . apache . synapse . commons . staxon . core . event . SimpleXMLFilteredEventReaderTest . TypeFilter ( javax . xml . stream . XMLStreamConstants . COMMENT ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { retur... | org . junit . Assert . assertFalse ( reader . hasNext ( ) ) |
getProcessDefinitionIdsByActivationState ( ) { final java . util . List < java . lang . Long > processDefinitionIds = java . util . Arrays . asList ( 3L ) ; doReturn ( processDefinitionIds ) . when ( persistenceService ) . selectList ( org . mockito . Matchers . < org . bonitasoft . engine . persistence . SelectListDes... | org . junit . Assert . assertEquals ( processDefinitionIds , result ) |
equals_null ( ) { final net . sf . qualitycheck . immutableobject . domain . Import a = net . sf . qualitycheck . immutableobject . domain . Import . of ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return fal... | org . junit . Assert . assertFalse ( a . equals ( null ) ) |
testAbsolutePathForJavaFile ( ) { openwhisk . java . local . Launcher launcher = new openwhisk . java . local . Launcher ( ) ; java . nio . file . Path filePath = java . nio . file . Paths . get ( "./src/test/resources/aproject/App.java" ) ; launcher . setBinaryPath ( filePath . toRealPath ( ) ) ; com . google . gson .... | org . junit . Assert . assertNotNull ( result ) |
testToString ( ) { org . eclipse . rap . rwt . internal . theme . CssShadow shadow = org . eclipse . rap . rwt . internal . theme . CssShadow . create ( false , 10 , 10 , 0 , 0 , CssColor . BLACK ) ; java . lang . String expected = "CssShadow{<sp>false,<sp>10,<sp>10,<sp>0,<sp>0,<sp>#000000,<sp>1.0<sp>}" ; "<AssertPlace... | org . junit . Assert . assertEquals ( expected , shadow . toString ( ) ) |
available_onClosedStream ( ) { final java . lang . String testString = "helloWorld" ; final byte [ ] testData = testString . getBytes ( ) ; final java . io . InputStream is = new org . exist . util . io . FastByteArrayInputStream ( testData ) ; final org . exist . util . io . CachingFilterInputStream cfis = new org . e... | org . junit . Assert . assertEquals ( 0 , cfis . available ( ) ) |
testGetInitId ( ) { System . out . println ( "testGetInitMessageId" ) ; gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord instance = new gov . hhs . fha . nhinc . asyncmsgs . model . AsyncMsgRecord ( ) ; java . lang . Long result = instance . getId ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertNull ( result ) |
testAbstractMethodWithParametersAndReturnOnClassNoErrors_withAllowAbstractClassesEnabled ( ) { java . lang . String [ ] imports = new java . lang . String [ ] { } ; java . lang . String [ ] declarations = new java . lang . String [ ] { } ; java . lang . String [ ] testCode = new java . lang . String [ ] { } ; java . la... | org . junit . Assert . assertEquals ( "" , result ) |
testUpdateClustersToggleKerberos_Fail ( ) { org . easymock . Capture < org . apache . ambari . server . controller . AmbariManagementController > controllerCapture = org . easymock . EasyMock . newCapture ( ) ; com . google . inject . Injector injector = createStrictMock ( com . google . inject . Injector . class ) ; o... | org . junit . Assert . assertSame ( controller , controllerCapture . getValue ( ) ) |
testSetMessageReturnsDialog ( ) { com . eclipsesource . tabris . widgets . ClientDialog dialog = new com . eclipsesource . tabris . widgets . ClientDialog ( ) ; com . eclipsesource . tabris . widgets . ClientDialog actualDialog = dialog . setMessage ( "bar" ) ; "<AssertPlaceHolder>" ; } setMessage ( java . lang . Strin... | org . junit . Assert . assertSame ( dialog , actualDialog ) |
getEncounters_shouldNotWork_WithPartialIdentifier ( ) { java . util . List < org . openmrs . Encounter > encountersByPartialIdentifier = dao . getEncounters ( "123" , null , null , null , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) .... | org . junit . Assert . assertEquals ( 0 , encountersByPartialIdentifier . size ( ) ) |
testRowAccess_2x4 ( ) { org . la4j . matrix . Matrix a = m ( org . la4j . matrix . MatrixTest . a ( 1.0 , 0.0 , 4.0 , 0.0 ) , org . la4j . matrix . MatrixTest . a ( 0.0 , 5.0 , 0.0 , 7.0 ) ) ; org . la4j . matrix . Matrix b = m ( org . la4j . matrix . MatrixTest . a ( 1.0 , 0.0 , 4.0 , 0.0 ) , org . la4j . matrix . Mat... | org . junit . Assert . assertEquals ( b , a ) |
evaluateGeneralRegressionAudit ( ) { org . jpmml . rattle . Batch batch = new org . jpmml . rattle . RattleBatch ( "GeneralRegression" , "Audit" ) ; "<AssertPlaceHolder>" ; } evaluate ( org . jpmml . evaluator . Batch ) { org . jpmml . evaluator . PMML pmml = org . jpmml . evaluator . IOUtil . unmarshal ( batch . getMo... | org . junit . Assert . assertTrue ( org . jpmml . rattle . BatchUtil . evaluate ( batch ) ) |
test_GET_user_ok ( ) { org . apache . usergrid . rest . applications . collection . users . Collection users = usersResource . get ( ) ; java . lang . String uuid = users . getResponse ( ) . getEntities ( ) . get ( 0 ) . getUuid ( ) . toString ( ) ; java . lang . String email = users . getResponse ( ) . getEntities ( )... | org . junit . Assert . assertEquals ( email , user . get ( "email" ) . toString ( ) ) |
testGetPort_Null ( ) { com . englishtown . vertx . cassandra . impl . JsonCassandraConfigurator configurator = new com . englishtown . vertx . cassandra . impl . JsonCassandraConfigurator ( vertx ) ; "<AssertPlaceHolder>" ; } getPort ( ) { return port ; } | org . junit . Assert . assertNull ( configurator . getPort ( ) ) |
build_response_with_link_account_card ( ) { com . amazon . ask . model . Response response = com . amazon . ask . model . Response . builder ( ) . withCard ( com . amazon . ask . model . ui . LinkAccountCard . builder ( ) . build ( ) ) . build ( ) ; java . util . Optional < com . amazon . ask . model . Response > respo... | org . junit . Assert . assertEquals ( responseWithBuilder . get ( ) , response ) |
testNullParameters ( ) { java . lang . String $ref = "#/components/parameters/Pet" ; org . eclipse . microprofile . openapi . models . Components component = model . getComponents ( ) ; component . setParameters ( null ) ; model . setComponents ( component ) ; context = new com . ibm . ws . microprofile . openapi . tes... | org . junit . Assert . assertEquals ( 1 , vh . getEventsSize ( ) ) |
testAppendParametersToQueryString_1 ( ) { java . lang . String url = "" ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap ( ) ; java . lang . String result = org . jinstagram . http . URLUtils . appendParametersToQueryString ( url , params ) ; "<AssertPlaceHolder>" ;... | org . junit . Assert . assertEquals ( "" , result ) |
testCase101 ( ) { org . evosuite . testcase . DefaultTestCase tc = buildTestCase101 ( ) ; java . util . List < org . evosuite . symbolic . BranchCondition > branch_conditions = executeTest ( tc ) ; "<AssertPlaceHolder>" ; } size ( ) { return theTest . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , branch_conditions . size ( ) ) |
query_by_special_char ( ) { dao . update ( dao . fetch ( org . nutz . dao . test . meta . Pet . class ) . setName ( "a@b" ) ) ; java . util . List < org . nutz . dao . test . meta . Pet > pets = dao . query ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "name" , "=" , "a@b" ) , null )... | org . junit . Assert . assertEquals ( 1 , pets . size ( ) ) |
testSchedulingRequestDisabledByDefault ( ) { org . apache . hadoop . conf . Configuration csConf = org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . TestUtils . getConfigurationWithMultipleQueues ( new org . apache . hadoop . conf . Configuration ( ) ) ; org . apache . hadoop . yarn . ser... | org . junit . Assert . assertTrue ( caughtException ) |
storesLowerCaseIdentifiersShouldBeReturnFalse ( ) { org . neo4j . jdbc . Neo4jDatabaseMetaData databaseMetaData = mock ( org . neo4j . jdbc . Neo4jDatabaseMetaData . class , withSettings ( ) . defaultAnswer ( Mockito . CALLS_REAL_METHODS ) ) ; "<AssertPlaceHolder>" ; } storesLowerCaseIdentifiers ( ) { return false ; } | org . junit . Assert . assertFalse ( databaseMetaData . storesLowerCaseIdentifiers ( ) ) |
getValueFromJsonString_good_case ( ) { java . lang . String jsonString = "{\"deviceId\":\"xxx-device\",\"generationId\":\"111111111111111111\",\"etag\":\"MA==\",\"connectionState\":\"Disconnected\",\"status\":\"Disabled\",\"statusReason\":null,\"connectionStateUpdatedTime\":\"0001-01-01T00:00:00\",\"statusUpdatedTime\"... | org . junit . Assert . assertEquals ( expResult , result ) |
testAddLongStringByteSequence ( ) { final int COUNT = 10 ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( COUNT ) ; scheduler . addListener ( new org . apache . activemq . broker . scheduler . JobListener ( ) { @ org . apache . activemq . broker . scheduler . Ove... | org . junit . Assert . assertEquals ( 0 , latch . getCount ( ) ) |
testRegisterListenerOtherThread ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > exception = new java . util . concurrent . atomic . AtomicReference < java . lang . RuntimeException > ( null ) ; final com . sun . sgs . service . TransactionListener listener = new com . ... | org . junit . Assert . assertEquals ( com . sun . sgs . test . impl . service . transaction . IllegalStateException . class , ( e == null ? null : e . getClass ( ) ) ) |
testCaSTransform2 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 0 , 4 , 5 } ) ; org . nd4j . linalg . api . ndarray . INDArray comp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 3 , 2 , 3 , 4 , 5 } ) ; org . nd4... | org . junit . Assert . assertEquals ( comp , array ) |
testGetTableCellRendererComponent ( ) { System . out . println ( "getTableCellRendererComponent" ) ; javax . swing . JTable table = new javax . swing . JTable ( ) ; java . lang . Object color = java . awt . Color . red ; boolean isSelected = false ; boolean hasFocus = false ; int row = 0 ; int column = 0 ; kg . apc . j... | org . junit . Assert . assertNotNull ( result ) |
testSecureSourceWhileChannelConnected ( ) { final java . net . InetSocketAddress remoteAddress = new java . net . InetSocketAddress ( "192.168.1.22" , 2727 ) ; final org . restcomm . media . core . network . deprecated . channel . NetworkChannel channel = org . mockito . Mockito . mock ( org . restcomm . media . core .... | org . junit . Assert . assertTrue ( secure ) |
testGetRasterNamesToBeExported_exportMasksOnly ( ) { final boolean exportMasks = true ; final org . esa . beam . pixex . output . PixExRasterNamesFactory pixExRasterNamesFactory = new org . esa . beam . pixex . output . PixExRasterNamesFactory ( false , false , exportMasks , null ) ; final java . lang . String [ ] rast... | org . junit . Assert . assertThat ( rasterNames , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
client_registration_sets_time_to_live ( ) { givenASimpleClient ( lifetime ) ; registry . registerClient ( client ) ; "<AssertPlaceHolder>" ; } isAlive ( ) { return ( ( lastUpdate . getTime ( ) ) + ( ( lifeTimeInSec ) * 1000 ) ) > ( java . lang . System . currentTimeMillis ( ) ) ; } | org . junit . Assert . assertTrue ( client . isAlive ( ) ) |
setDatacontainerValues_configuratorURL_CUSTOMER_SUBSCRIPTION ( ) { org . oscm . domobjects . Product prod = createProduct ( 1 , 1 , ServiceType . CUSTOMER_SUBSCRIPTION ) ; org . oscm . domobjects . Product copy = new org . oscm . domobjects . Product ( ) ; prod . setDatacontainerValues ( copy , ServiceType . CUSTOMER_S... | org . junit . Assert . assertEquals ( null , copy . getConfiguratorUrl ( ) ) |
intstream_of ( ) { java . util . OptionalInt max = java . util . stream . IntStream . of ( 5 , 10 ) . max ( ) ; "<AssertPlaceHolder>" ; } getAsInt ( ) { return 10 ; } | org . junit . Assert . assertEquals ( 10 , max . getAsInt ( ) ) |
messageReaderBuilderTest ( ) { java . io . InputStream stream = new java . io . ByteArrayInputStream ( "" . getBytes ( ) ) ; software . amazon . kinesis . multilang . MessageReader reader = new software . amazon . kinesis . multilang . MessageReader ( ) . initialize ( stream , software . amazon . kinesis . multilang . ... | org . junit . Assert . assertNotNull ( reader ) |
testSumComputedEquals ( ) { de . lessvoid . nifty . tools . SizeValue a = de . lessvoid . nifty . tools . SizeValue . sum ( 5 ) ; de . lessvoid . nifty . tools . SizeValue b = new de . lessvoid . nifty . tools . SizeValue ( SizeValueType . Sum , 5 ) ; "<AssertPlaceHolder>" ; } sum ( int ) { return new de . lessvoid . n... | org . junit . Assert . assertEquals ( a , b ) |
testAddVariableToRootInnerAndListProperty ( ) { java . util . Map < java . lang . String , java . lang . Object > commandMap = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String , java . lang . Object > pParams = new java . util . LinkedHashMap ( ) ; java . util . Map < java . lang . String ... | org . junit . Assert . assertEquals ( expectedMap , actualMap ) |
shouldInjectPipelineBatch ( ) { com . couchbase . client . java . query . N1qlParams source = com . couchbase . client . java . query . N1qlParams . build ( ) . pipelineBatch ( 99 ) ; com . couchbase . client . java . document . json . JsonObject expected = com . couchbase . client . java . document . json . JsonObject... | org . junit . Assert . assertEquals ( expected , actual ) |
conversionToDataType ( ) { final org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 dcv = new org . drools . workbench . models . guided . dtable . shared . model . DTCellValue52 ( value ) ; dcv . setOtherwise ( isOtherwise ) ; cellUtilities . convertDTCellValueType ( DataType . DataTy... | org . junit . Assert . assertEquals ( expected , dcv . getNumericValue ( ) ) |
testFireAndAlarm ( ) { org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Room > room = any ( org . drools . modelcompiler . fireandalarm . model . Room . class ) ; org . drools . model . Variable < org . drools . modelcompiler . fireandalarm . model . Fire > fire = any ( org . droo... | org . junit . Assert . assertTrue ( sprinkler1 . isOn ( ) ) |
test_withAmount_BigDecimal_same ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . withAmount ( org . joda . money . TestBigMoney . BIGDEC_2_34 ) ; "<AssertPlaceHolder>" ; } withAmount ( double ) { return withAmount ( amount , RoundingMode . UNNECESSARY ) ; } | org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test ) |
generateInvocationIdIfLengthIsPositive ( ) { when ( propertyChain . getProperty ( ( ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . TRACEE_DEFAULT_PROFILE_PREFIX ) + ( io . tracee . configuration . PropertiesBasedTraceeFilterConfiguration . GENERATE_INVOCATION_ID ) ) ) ) . thenReturn ( "1" ) ... | org . junit . Assert . assertThat ( unit . shouldGenerateInvocationId ( ) , org . hamcrest . Matchers . is ( true ) ) |
thenApply ( ) { final eu . toolchain . concurrent . Completable < java . lang . Integer > a = setupFuture ( ) ; final eu . toolchain . concurrent . Stage < java . lang . Integer > next = a . thenApply ( ( v ) -> v + ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) ) ; a . complete ( eu . toolchain . conc... | org . junit . Assert . assertThat ( next . join ( ) , org . hamcrest . core . Is . is ( ( ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) + ( eu . toolchain . concurrent . AbstractCompletableIT . VALUE ) ) ) ) |
testShouldFindExistingVoluntarySavingsAccountsForClientsWhenCenterIsTopOfCustomerHierarchy ( ) { savingsProduct = new org . mifos . domain . builders . SavingsProductBuilder ( ) . voluntary ( ) . appliesToClientsOnly ( ) . buildForIntegrationTests ( ) ; savingsAccount = new org . mifos . domain . builders . SavingsAcco... | org . junit . Assert . assertThat ( mandatorySavingAccounts . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
options_inMemoryFilteringContains ( ) { comboBox . setFilteringMode ( FilteringMode . CONTAINS ) ; for ( int i = 0 ; i < 21 ; i ++ ) { comboBox . addItem ( ( "" + i ) ) ; } com . vaadin . v7 . ui . ComboBoxTest . setFilterAndCurrentPage ( comboBox , "2" , 0 ) ; java . util . List < ? > options = comboBox . getFilteredO... | org . junit . Assert . assertEquals ( 3 , options . size ( ) ) |
testCleanUp ( ) { org . opencastproject . dictionary . regexp . DictionaryServiceImpl service = new org . opencastproject . dictionary . regexp . DictionaryServiceImpl ( ) ; java . lang . String in = "This<sp>is<sp>a<sp>test<sp>sentence." ; java . lang . String out = "This<sp>is<sp>a<sp>test<sp>sentence" ; "<AssertPlac... | org . junit . Assert . assertEquals ( out , service . cleanUpText ( in ) . getText ( ) ) |
deleteNonExistent ( ) { final java . lang . String dummyId = "94bcb762-9ee9-4b43-a912-063509966988" ; "<AssertPlaceHolder>" ; } delete ( boolean ) { structuredDelegate . delete ( deleteData ) ; } | org . junit . Assert . assertFalse ( store . delete ( dummyId ) ) |
testMongoClientDeleteResultWithRemovedCountSpecified ( ) { long randomRemoved = io . vertx . test . core . TestUtils . randomLong ( ) ; io . vertx . ext . mongo . MongoClientDeleteResult mongoClientDeleteResult = new io . vertx . ext . mongo . MongoClientDeleteResult ( randomRemoved ) ; "<AssertPlaceHolder>" ; } getRem... | org . junit . Assert . assertEquals ( randomRemoved , mongoClientDeleteResult . getRemovedCount ( ) ) |
testSetHandler ( ) { org . eclipse . rap . rwt . remote . OperationHandler handler = mock ( org . eclipse . rap . rwt . remote . OperationHandler . class ) ; remoteObject . setHandler ( handler ) ; org . eclipse . rap . rwt . remote . OperationHandler result = remoteObject . getHandler ( ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( handler , result ) |
sendAmqpMessageEncodeThrowsBufferOverflowSuccess ( ) { tests . unit . com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpsConnection amqpsConnection = new tests . unit . com . microsoft . azure . sdk . iot . deps . transport . amqp . AmqpsConnection ( tests . unit . com . microsoft . azure . sdk . iot ... | org . junit . Assert . assertEquals ( true , result ) |
testGetSyntaxErrors_NoQuotes_End ( ) { a . setProperty ( "prop" , "Expected<sp>value<sp>is<sp>{0}" ) ; final org . oscm . build . ant . PropertiesSyntaxChecker checker = new org . oscm . build . ant . PropertiesSyntaxChecker ( a ) ; "<AssertPlaceHolder>" ; } getSyntaxSingleQuotesErrorKeys ( ) { java . lang . String sin... | org . junit . Assert . assertEquals ( 0 , checker . getSyntaxSingleQuotesErrorKeys ( ) . size ( ) ) |
testAssertTrue ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "count(//xs:element[@name='assertTrueField']//xs:enumeration[@value='true'])<sp>=<sp>1<sp>and<sp>count(//xs:element[@name='assertTrueField']//xs:enumeration[@value='1'])<sp>=<sp>1<sp>and<sp>count(//xs:element[... | org . junit . Assert . assertEquals ( expResult , result ) |
test_getConvexHull__448546 ( ) { org . eclipse . gef . geometry . planar . Point [ ] points = org . eclipse . gef . geometry . internal . utils . PointListUtils . toPointsArray ( new double [ ] { - 22.27172999999999 , 100.0 , - 22.27172999999999 , 129.33333333333334 , 222.27173 , 100.0 , 222.27173 , 129.33333333333334 ... | org . junit . Assert . assertEquals ( false , thrown ) |
testNextBoundNameRead ( ) { com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . setBinding ( txn , "a" , 100 ) ; newTransaction ( ) ; com . sun . sgs . test . impl . service . data . store . BasicTxnIsolationTest . store . getBinding ( txn , "a" ) ; com . sun . sgs . test . impl . s... | org . junit . Assert . assertSame ( null , runner . getResult ( ) ) |
test ( ) { try ( final me . geso . avans . ControllerBaseTest . MyController controller = new me . geso . avans . ControllerBaseTest . MyController ( ) ) { final me . geso . avans . Filters filters = controller . getFilters ( ) ; "<AssertPlaceHolder>" ; } } getResponseFilters ( ) { return this . responseFilters ; } | org . junit . Assert . assertThat ( filters . getResponseFilters ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
phraseTest ( ) { java . lang . String query = "ID<sp>==<sp>'TEST_ID'<sp>&&<sp>content:phrase(termOffsetMap,'boy','car')" ; final java . util . List < datawave . webservice . query . result . event . DefaultEvent > events = getQueryResults ( query , true , true ) ; "<AssertPlaceHolder>" ; final java . util . List < java... | org . junit . Assert . assertEquals ( 1 , events . size ( ) ) |
testHospitalSets ( ) { java . lang . String code = "" ; try { code = _setupTestHospital ( true ) ; _checkHospitalIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkHospitalIntoDb ( java . lang . String ) { org . isf . hospital . model . Hospita... | org . junit . Assert . assertEquals ( true , false ) |
remove_on_that_collection__check_size_is_0_after ( ) { com . artemis . utils . IntBag bag = new com . artemis . utils . IntBag ( 20 ) ; bag . add ( 8008 ) ; com . artemis . utils . IntBagIterator intBagIterator = new com . artemis . utils . IntBagIterator ( bag ) ; intBagIterator . next ( ) ; intBagIterator . remove ( ... | org . junit . Assert . assertEquals ( 0 , bag . size ( ) ) |
shouldMapLONRegion ( ) { com . rackspace . docs . core . event . Region region = org . openstack . atlas . atomhopper . factory . UsageEntryFactoryImpl . mapRegion ( "LON" ) ; "<AssertPlaceHolder>" ; } mapRegion ( java . lang . String ) { if ( configRegion . equals ( "DFW" ) ) { return com . rackspace . docs . core . e... | org . junit . Assert . assertEquals ( Region . LON , region ) |
testCompareTo_less ( ) { com . google . appengine . api . users . User user1 = new com . google . appengine . api . users . User ( "aa" , "dd" ) ; com . google . appengine . api . users . User user2 = new com . google . appengine . api . users . User ( "bb" , "cc" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( user1 . compareTo ( user2 ) ) < 0 ) ) |
testOperation5 ( ) { test . MyBuggy b = new test . MyBuggy ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( null , b . operation ( 12 , 1 , null ) ) |
testSuitableIfCacheEntryIsFresh ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsAgo ) ) , new or... | org . junit . Assert . assertTrue ( impl . canCachedResponseBeUsed ( host , request , entry , now ) ) |
testCreateStream ( ) { mockStorageContainer ( org . apache . bookkeeper . stream . storage . impl . service . RangeStoreServiceImplTest . SCID ) ; org . apache . bookkeeper . stream . proto . storage . CreateStreamResponse expectedResp = org . apache . bookkeeper . stream . proto . storage . CreateStreamResponse . getD... | org . junit . Assert . assertSame ( expectedResp , org . apache . bookkeeper . common . concurrent . FutureUtils . result ( rrStore . createStream ( expectedReq ) ) ) |
getUser_7 ( ) { when ( this . userManager . getUser ( org . mockito . Mockito . anyString ( ) , org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( null ) ; com . agiletec . aps . system . services . user . UserDetails user = this . authenticationProviderManager . getUser ( "test_user" , "password" ) ; "<AssertP... | org . junit . Assert . assertNull ( user ) |
testForNullPointerException ( ) { java . util . List < java . lang . String > sentence = java . util . Arrays . asList ( "The" , "and" 6 , "were" , "running" , "and" , "and" 0 , "bark,bark" 0 , "and" 5 , "street" ) ; java . util . List < java . lang . String > sentencePOS = java . util . Arrays . asList ( "and" 3 , "NN... | org . junit . Assert . assertEquals ( expectedLemmas . get ( i ) , actualLemmas . get ( i ) ) |
testNewInstance ( ) { org . objenesis . Objenesis o = new org . objenesis . ObjenesisStd ( ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class ) { return org . objenesis . ObjenesisHelper . OBJENESIS_STD . newInstance ( clazz ) ; } | org . junit . Assert . assertEquals ( getClass ( ) , o . newInstance ( getClass ( ) ) . getClass ( ) ) |
testSimpleBeanInjected ( ) { "<AssertPlaceHolder>" ; bean . ping ( ) ; } | org . junit . Assert . assertNotNull ( bean ) |
shouldNotRemoveOrphanVersionsWhenProxyRemovedButLiveRemains ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , "testfile1" , "File" ) ; doc = session . createDocument ( doc ) ; org . nuxeo . ecm . core . api . DocumentRef ver = doc . checkIn ( VersioningOption . MINOR , "" ... | org . junit . Assert . assertEquals ( 1 , vs . size ( ) ) |
tryNextAddressIfTimeoutExceptionNoAutoRecovery ( ) { final com . rabbitmq . client . impl . AMQConnection connectionThatThrowsTimeout = mock ( com . rabbitmq . client . impl . AMQConnection . class ) ; final com . rabbitmq . client . impl . AMQConnection connectionThatSucceeds = mock ( com . rabbitmq . client . impl . ... | org . junit . Assert . assertSame ( connectionThatSucceeds , returnedConnection ) |
testContentName ( ) { request . setContentName ( "name" ) ; "<AssertPlaceHolder>" ; } getContentName ( ) { return ( ( java . lang . String ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . CONTENT_NAME ) ) ) ; } | org . junit . Assert . assertEquals ( "name" , request . getContentName ( ) ) |
testCellCounteOutOfTimeRange ( ) { final org . apache . hadoop . hbase . TableName sourceTable = org . apache . hadoop . hbase . TableName . valueOf ( name . getMethodName ( ) ) ; byte [ ] [ ] families = new byte [ ] [ ] { org . apache . hadoop . hbase . mapreduce . TestCellCounter . FAMILY_A , org . apache . hadoop . ... | org . junit . Assert . assertTrue ( data . isEmpty ( ) ) |
testConstructor ( ) { final java . util . List < com . allanbank . mongodb . bson . Element > elements = java . util . Collections . singletonList ( ( ( com . allanbank . mongodb . bson . Element ) ( new com . allanbank . mongodb . bson . element . BooleanElement ( "1" , false ) ) ) ) ; final com . allanbank . mongodb ... | org . junit . Assert . assertEquals ( elements , element . getElements ( ) ) |
testThreadSafetyOfCipherService ( ) { int threadCount = 30 ; final org . pentaho . platform . engine . security . CipherEncryptionService service = new org . pentaho . platform . engine . security . CipherEncryptionService ( ) ; service . afterPropertiesSet ( ) ; java . util . concurrent . ArrayBlockingQueue < java . l... | org . junit . Assert . assertEquals ( s , dec ) |
unknown_target_type_does_no_transform_doc_string ( ) { java . lang . String docString = "A<sp>rather<sp>long<sp>and<sp>boring<sp>string<sp>of<sp>documentation" ; io . cucumber . stepexpression . StepExpression expression = new io . cucumber . stepexpression . StepExpressionFactory ( registry ) . createExpression ( "Giv... | org . junit . Assert . assertEquals ( docString , match . get ( 0 ) . getValue ( ) ) |
testRollbackAndDoubleExecution ( ) { final org . apache . hadoop . hbase . NamespaceDescriptor nsd = org . apache . hadoop . hbase . NamespaceDescriptor . create ( "testRollbackAndDoubleExecution" ) . build ( ) ; final java . lang . String nsKey = "foo" ; final java . lang . String nsValue = "bar" ; final org . apache ... | org . junit . Assert . assertNull ( currentNsDescriptor . getConfigurationValue ( nsKey ) ) |
testConvertToDataModelTypeWithoutStats ( ) { studyEntry . getSamplesData ( ) . clear ( ) ; org . opencb . opencga . storage . mongodb . variant . converters . List < java . lang . String > sampleNames = null ; org . opencb . opencga . storage . mongodb . variant . converters . DocumentToStudyVariantEntryConverter conve... | org . junit . Assert . assertEquals ( studyEntry , converted ) |
testClear ( ) { tested . open ( diagram , callback ) ; tested . clear ( ) ; "<AssertPlaceHolder>" ; verify ( viewer , times ( 1 ) ) . clear ( ) ; } getInstance ( ) { return delegate . getInstance ( ) ; } | org . junit . Assert . assertNull ( tested . getInstance ( ) ) |
testCanAddALongTermIdentifier ( ) { final long lti = smem . smem_lti_add_id ( 'Z' , 99 ) ; "<AssertPlaceHolder>" ; } smem_lti_add_id ( char , long ) { long return_val = 0 ; db . lti_add . setLong ( 1 , ( ( long ) ( name_letter ) ) ) ; db . lti_add . setLong ( 2 , ( ( long ) ( name_number ) ) ) ; db . lti_add . setLong ... | org . junit . Assert . assertEquals ( 1 , lti ) |
testReadArrayNotEnough ( ) { org . apache . hadoop . hdfs . util . ExactSizeInputStream s = new org . apache . hadoop . hdfs . util . ExactSizeInputStream ( org . apache . hadoop . hdfs . util . TestExactSizeInputStream . byteStream ( "he" ) , 5 ) ; byte [ ] buf = new byte [ 10 ] ; "<AssertPlaceHolder>" ; try { s . rea... | org . junit . Assert . assertEquals ( 2 , s . read ( buf , 0 , 5 ) ) |
testCreateDatabaseConnectionAttributes ( ) { "<AssertPlaceHolder>" ; } createDatabaseConnectionAttributes ( ) { return new org . pentaho . platform . plugin . services . importexport . exportManifest . bindings . DatabaseConnection . Attributes ( ) ; } | org . junit . Assert . assertNotNull ( factory . createDatabaseConnectionAttributes ( ) ) |
ACLproncipal_hreffalse ( ) { java . lang . String aclString = "<D:acl<sp>xmlns:D='DAV:'<sp>xml:base='https://fqdn/aclTest/__role/__/'>" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( "</D:privilege>" 1 + "<D:principal>" ) + "<D:href>" ) + "</D:privilege>" 2 ) + "role" ) + "</D:test>" ) + "</D:privilege>" 3 ) + "</D:principal>" ) + "</D... | org . junit . Assert . assertFalse ( aclToSet . validateAcl ( true ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.