input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testRuntimeExceptionInListenerWithoutExceptionHandler ( ) { java . lang . RuntimeException exception = new java . lang . RuntimeException ( ) ; addMaliciousListener ( SWT . Resize , exception ) ; generateEvent ( shell , SWT . Resize ) ; try { display . readAndDispatch ( ) ; org . junit . Assert . fail ( ) ; } catch ( j... | org . junit . Assert . assertSame ( exception , expected ) |
testInvoke_emptyCall ( ) { java . lang . Object [ ] args = null ; when ( soapCall . getSoapClientMethod ( ) ) . thenReturn ( com . google . api . ads . common . lib . soap . testing . MockSoapClient . class . getMethod ( "emptyCall" ) ) ; when ( soapCall . getSoapClient ( ) ) . thenReturn ( new com . google . api . ads... | org . junit . Assert . assertNull ( result ) |
testStore ( ) { for ( org . springframework . context . ApplicationContext context : AppContextSetup . contextList ) { org . apache . taverna . reference . ErrorDocumentDao dao = ( ( org . apache . taverna . reference . ErrorDocumentDao ) ( context . getBean ( "testErrorDao" ) ) ) ; org . apache . taverna . reference .... | org . junit . Assert . assertNotNull ( dao . get ( id ) ) |
testRetrieveLetter ( ) { com . lob . model . Letter testLetter = com . lob . model . Letter . list ( ) . getResponseBody ( ) . getData ( ) . get ( 0 ) ; com . lob . net . LobResponse < com . lob . model . Letter > response = com . lob . model . Letter . retrieve ( testLetter . getId ( ) ) ; com . lob . model . Letter L... | org . junit . Assert . assertEquals ( testLetter . getId ( ) , Letter . getId ( ) ) |
canEchoWrongOK ( ) { java . lang . String script = "OPEN" 0 + ( ( ( ( ( ( ( ( ( "accepted\n" + "OPEN" 1 ) + "read<sp>\"ello\"\n" ) + "closed\n" ) + "#Connect<sp>channel\n" ) + "connect<sp>\'tcp://localhost:8080\'\n" ) + "OPEN" 1 ) + "write<sp>\"Hello\"\n" ) + "close\n" ) + "closed\n" ) ; org . kaazing . k3po . lang . i... | org . junit . Assert . assertEquals ( expectedScript , observedScript ) |
testWildcardParameterCrossesSlashBoundary ( ) { org . ocpsoft . rewrite . test . HttpAction < org . apache . http . client . methods . HttpGet > action = get ( "/test/next/path.txt" ) ; "<AssertPlaceHolder>" ; } getStatusCode ( ) { return response . getStatusLine ( ) . getStatusCode ( ) ; } | org . junit . Assert . assertEquals ( 200 , action . getStatusCode ( ) ) |
combine_two_lists_in_java_with_apache_commons ( ) { @ com . levelup . java . collections . SuppressWarnings ( "unchecked" ) java . util . List < java . lang . String > allStates = org . apache . commons . collections . ListUtils . union ( firstHalfStates , secondHalfStates ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( allStates . size ( ) ) == 50 ) ) |
testFromViewValueCenterWithStepSize ( ) { expect ( sliderView . filter ( 35 , 0 ) ) . andReturn ( 35 ) ; sliderView . update ( 25 ) ; sliderView . valueChanged ( 0.25F ) ; replay ( sliderView ) ; slider . bindToView ( sliderView , 0.0F , 1.0F , 0.25F , 0.25F ) ; slider . setValueFromPosition ( 35 , 0 ) ; "<AssertPlaceH... | org . junit . Assert . assertEquals ( 0.25F , slider . getValue ( ) ) |
testRequestContextField ( ) { java . lang . reflect . Field field = org . apache . tuscany . sca . implementation . java . introspect . impl . ContextProcessorTestCase . Foo . class . getDeclaredField ( "requestContext" ) ; org . apache . tuscany . sca . implementation . java . JavaImplementation type = javaImplementat... | org . junit . Assert . assertNotNull ( type . getResources ( ) . get ( "requestContext" ) ) |
byteAlign ( ) { final byte [ ] data = new byte [ ] { - 64 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . BigDecoder fixture = new com . flagstone . transform . coder . BigDecoder ( stream ) ; fixture . readBits ( 2 , false ... | org . junit . Assert . assertEquals ( 1 , fixture . mark ( ) ) |
testMedicalWardGets ( ) { org . isf . medicalstockward . model . MedicalWardId id = null ; try { id = _setupTestMedicalWard ( false ) ; _checkMedicalWardIntoDb ( id ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkMedicalWardIntoDb ( org . isf . medicalsto... | org . junit . Assert . assertEquals ( true , false ) |
testGaussianVsBilateral ( ) { final byte [ ] data = new byte [ ] { 7 , 8 , 9 , 1 , 2 , 3 , 7 , 9 , 8 , 1 , 3 , 2 , 8 , 7 , 9 , 2 , 1 , 3 , 8 , 9 , 7 , 2 , 3 , 1 , 9 , 7 , 8 , 3 , 1 , 2 , 9 , 8 , 7 , 3 , 2 , 1 } ; final net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > in = net . imglib2 ... | org . junit . Assert . assertEquals ( areCongruent ( gaussOut , bilateralOut , 0 ) , false ) |
testIDAdapterAddedToArchimateModel ( ) { "<AssertPlaceHolder>" ; } getIDAdapter ( ) { return fIDAdapter ; } | org . junit . Assert . assertNotNull ( model . getIDAdapter ( ) ) |
addFile_NoPerms_CallAcceptFilesOnlyOnce ( ) { org . easymock . classextension . EasyMockSupport mm = new org . easymock . classextension . EasyMockSupport ( ) ; final org . codehaus . plexus . archiver . Archiver delegate = mm . createMock ( org . codehaus . plexus . archiver . Archiver . class ) ; delegate . addFile (... | org . junit . Assert . assertEquals ( 1 , counter . getCount ( ) ) |
shouldReturnNullOnHostNameWithSeveralDotsAndDashesValidation ( ) { java . lang . String validHostname = "ho-st.na-me.com" ; org . eclipse . che . ide . ui . dialogs . input . InputValidator . Violation violation = ( ( org . eclipse . che . ide . ui . dialogs . input . InputValidator ) ( presenter . hostNameValidator ) ... | org . junit . Assert . assertNull ( violation ) |
testAddEntryLogMetadata ( ) { org . apache . bookkeeper . bookie . EntryLogMetadataManager manager = new org . apache . bookkeeper . bookie . EntryLogMetadataManager ( org . apache . bookkeeper . stats . NullStatsLogger . INSTANCE ) ; manager . addEntryLogMetadata ( new org . apache . bookkeeper . bookie . EntryLogMeta... | org . junit . Assert . assertTrue ( manager . containsEntryLog ( 1L ) ) |
testGetDataProvider ( ) { dataProviderDaoTestHelper . createDataProviderEntity ( org . finra . herd . service . DATA_PROVIDER_NAME ) ; org . finra . herd . model . api . xml . DataProvider resultDataProvider = dataProviderService . getDataProvider ( new org . finra . herd . model . api . xml . DataProviderKey ( DATA_PR... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . DataProvider ( DATA_PROVIDER_NAME ) , resultDataProvider ) |
testToRangerPolicyForNullServiceAndNullVXPolicy ( ) { org . apache . ranger . view . VXPolicy vXPolicy = null ; org . apache . ranger . plugin . model . RangerService service = null ; org . apache . ranger . plugin . model . RangerPolicy actualRangerPolicy = serviceUtil . toRangerPolicy ( vXPolicy , service ) ; "<Asser... | org . junit . Assert . assertNull ( actualRangerPolicy ) |
testIsEmptyValueBlank ( ) { boolean b = org . terasoluna . gfw . common . validator . constraintvalidators . ConstraintValidatorsUtils . isEmpty ( "" ) ; "<AssertPlaceHolder>" ; } isEmpty ( java . lang . String ) { return ( value == null ) || ( value . isEmpty ( ) ) ; } | org . junit . Assert . assertThat ( b , org . hamcrest . CoreMatchers . is ( true ) ) |
testListPrincipalsForPrefixFilterAll ( ) { java . lang . String prefix = "aab" ; org . sagebionetworks . repo . model . principal . TypeFilter filter = org . sagebionetworks . repo . model . principal . TypeFilter . ALL ; long offset = 1L ; long limit = 10L ; java . util . List < java . lang . Long > expectedResutls = ... | org . junit . Assert . assertEquals ( expectedResutls , results ) |
testGetBeanProperty ( ) { nz . co . breakpoint . jmeter . modifiers . TestPropertyAccessor . DummyTestElement element = new nz . co . breakpoint . jmeter . modifiers . TestPropertyAccessor . DummyTestElement ( ) ; nz . co . breakpoint . jmeter . modifiers . PropertyAccessor instance = new nz . co . breakpoint . jmeter ... | org . junit . Assert . assertEquals ( "foobar" , instance . getProperty ( element ) ) |
test_subusers__subuser_name__monitor_put ( ) { com . sendgrid . SendGrid sg = new com . sendgrid . SendGrid ( "SENDGRID_API_KEY" , true ) ; sg . setHost ( "localhost:4010" ) ; sg . addRequestHeader ( "X-Mock" , "200" ) ; com . sendgrid . Request request = new com . sendgrid . Request ( ) ; request . setMethod ( Method ... | org . junit . Assert . assertEquals ( 200 , response . getStatusCode ( ) ) |
testDeSerialization ( ) { try { org . apache . flink . api . common . typeinfo . TypeInformation < org . apache . flink . api . common . serialization . TypeInformationSerializationSchemaTest . MyPOJO > info = org . apache . flink . api . java . typeutils . TypeExtractor . getForClass ( org . apache . flink . api . com... | org . junit . Assert . assertEquals ( val , deser ) |
testMin ( ) { final java . lang . Double [ ] set = new org . geotoolkit . processing . math . min . Double [ ] { new java . lang . Double ( 15.5 ) , new java . lang . Double ( 10.02 ) , new java . lang . Double ( 1.43 ) , new java . lang . Double ( ( - 3.03 ) ) , new java . lang . Double ( 4.53 ) , new java . lang . Do... | org . junit . Assert . assertEquals ( new java . lang . Double ( ( - 6.21 ) ) , result ) |
testConvertAll ( ) { java . lang . Long id = 1L ; java . lang . String abbrName = "abbr<sp>Name" ; java . lang . String name = "n<sp>a<sp>m<sp>e" ; org . lnu . is . domain . specialty . SpecialtyType source = new org . lnu . is . domain . specialty . SpecialtyType ( ) ; source . setId ( id ) ; source . setAbbrName ( ab... | org . junit . Assert . assertEquals ( expecteds , actuals ) |
addBlock_validHash ( ) { de . neozo . jblockchain . common . domain . Block block = new de . neozo . jblockchain . common . domain . Block ( null , java . util . Collections . singletonList ( generateStableTransaction ( ) ) , 4847556 ) ; block . setTimestamp ( 42 ) ; block . setHash ( block . calculateHash ( ) ) ; bool... | org . junit . Assert . assertTrue ( success ) |
testMapNull ( ) { be . fedict . eid . applet . service . dto . DTOMapper dtoMapper = new be . fedict . eid . applet . service . dto . DTOMapper ( ) ; be . fedict . eid . applet . service . spi . IdentityDTO result = dtoMapper . map ( null , be . fedict . eid . applet . service . spi . IdentityDTO . class ) ; "<AssertPl... | org . junit . Assert . assertNull ( result ) |
testRectifiedLinearDerivative ( ) { org . nd4j . linalg . api . buffer . util . DataTypeUtil . setDTypeForContext ( DataBuffer . Type . DOUBLE ) ; org . nd4j . linalg . api . ndarray . INDArray z = org . nd4j . linalg . factory . Nd4j . zeros ( 100 ) ; double [ ] expOut = new double [ 100 ] ; for ( int i = 0 ; i < 100 ... | org . junit . Assert . assertTrue ( ( ( expOut [ i ] ) == ( zPrime . getDouble ( i ) ) ) ) |
testCopyPropertiesNullValue ( ) { com . feilong . store . member . User oldUser = new com . feilong . store . member . User ( ) ; oldUser . setId ( null ) ; com . feilong . store . member . User newUser = new com . feilong . store . member . User ( ) ; com . feilong . core . bean . PropertyUtil . copyProperties ( newUs... | org . junit . Assert . assertEquals ( null , newUser . getId ( ) ) |
testDefaultPlatformIsNull ( ) { com . eclipsesource . tabris . tracking . TrackingInfo trackingInfo = new com . eclipsesource . tabris . tracking . TrackingInfo ( ) ; com . eclipsesource . tabris . device . ClientDevice . Platform platform = trackingInfo . getPlatform ( ) ; "<AssertPlaceHolder>" ; } getPlatform ( ) { r... | org . junit . Assert . assertNull ( platform ) |
testGetSinaGNCJPageUrl ( ) { for ( int i = 1 ; i < 100 ; i ++ ) { java . lang . String url = cn . edu . zju . vlis . bigdata . common . UrlFactory . getSinaGNCJPageUrl ( i ) ; java . lang . String t = ( "http://roll.finance.sina.com.cn/finance/gncj/gncj/index_" + i ) + ".shtml" ; "<AssertPlaceHolder>" ; } } getSinaGNCJ... | org . junit . Assert . assertEquals ( t , url ) |
testGetFileNameWithoutExtension_String ( ) { System . out . println ( "getFileNameWithoutExtension" ) ; java . lang . String fileName = null ; java . lang . String expResult = null ; java . lang . String result = fr . jmmc . jmcs . util . FileUtils . getFileNameWithoutExtension ( fileName ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( expResult , result ) |
testMultilineInfoBlock ( ) { org . apache . hadoop . yarn . webapp . test . WebAppTests . testBlock ( org . apache . hadoop . yarn . webapp . view . TestInfoBlock . MultilineInfoBlock . class ) ; org . apache . hadoop . yarn . webapp . view . TestInfoBlock . pw . flush ( ) ; java . lang . String output = org . apache .... | org . junit . Assert . assertTrue ( ( ( output . contains ( expectedMultilineData1 ) ) && ( output . contains ( expectedMultilineData2 ) ) ) ) |
noErrorsByDefault ( ) { java . lang . String html = "<p>One</p<sp>href='no'>&arrgh;<font<sp>/><br<sp>/><foo" ; org . jsoup . parser . Parser parser = org . jsoup . parser . Parser . htmlParser ( ) ; org . jsoup . parser . Document doc = org . jsoup . Jsoup . parse ( html , "http://example.com" , parser ) ; java . util ... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
testIsRetryEnabledWithGetpropertyReturnsStringNum ( ) { new mockit . MockUp < org . apache . servicecomb . loadbalance . Configuration > ( ) { @ mockit . Mock private java . lang . String getProperty ( java . lang . String defaultValue , java . lang . String ... keys ) { return "1234" ; } } ; Configuration . INSTANCE .... | org . junit . Assert . assertNotNull ( Configuration . INSTANCE . isRetryEnabled ( "test" ) ) |
testSubscription ( ) { context = new org . springframework . context . support . ClassPathXmlApplicationContext ( "SnsSubscriptionsParserTests.xml" , getClass ( ) ) ; final java . lang . String expectedPayload = "Hello,<sp>World" ; org . springframework . integration . MessageChannel target = ( ( org . springframework ... | org . junit . Assert . assertEquals ( expectedPayload , payload ) |
shouldRejectNameLongerThan128Characters ( ) { lb . setName ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" ) ; org . openstack . atlas . api . validation . results . ValidatorResult result = validator . validate ( lb , org . openstack... | org . junit . Assert . assertFalse ( result . passedValidation ( ) ) |
shouldFailBecauseOfWrongOrderDates ( ) { com . qcadoo . model . api . Entity operationalTask = mockOperationalTask ( com . qcadoo . mes . operationalTasks . validators . OperationalTaskValidatorsTest . OTHER_TASK_TYPE , "some<sp>name" , com . qcadoo . mes . operationalTasks . validators . OperationalTaskValidatorsTest ... | org . junit . Assert . assertFalse ( isValid ) |
testisSelectionSameType_1 ( ) { org . talend . repository . model . RepositoryNode anaNode = createAnalysisNode ( "ana" , null , false ) ; setParentNode ( anaNode , ERepositoryObjectType . TDQ_ANALYSIS_ELEMENT ) ; org . talend . repository . model . RepositoryNode connectionNode = createConnectionNode ( "conn" , null ,... | org . junit . Assert . assertFalse ( flag ) |
interfaceWithConcreteTypeParameterSupertypeIsAssignableToRawSuperType ( ) { final org . jboss . errai . codegen . meta . MetaClass parameterized = org . jboss . errai . codegen . meta . MetaClassFactory . get ( org . jboss . errai . ioc . rebind . ioc . graph . impl . GraphUtilUnitTest . IntCollection . class ) ; final... | org . junit . Assert . assertTrue ( org . jboss . errai . ioc . rebind . ioc . graph . impl . GraphUtil . hasAssignableTypeParameters ( parameterized , raw ) ) |
buildConversationIdHeaderNullContainer ( ) { org . kie . server . remote . rest . common . Header conversationIdHeader = org . kie . server . remote . rest . common . util . RestUtils . buildConversationIdHeader ( null , registry , headers ) ; "<AssertPlaceHolder>" ; } buildConversationIdHeader ( java . lang . String ,... | org . junit . Assert . assertNull ( conversationIdHeader ) |
testRidbagsUpdateDeltaRemove ( ) { com . orientechnologies . orient . core . db . ODatabaseSession db = null ; com . orientechnologies . orient . core . db . OrientDB odb = null ; try { odb = new com . orientechnologies . orient . core . db . OrientDB ( "memory:" , com . orientechnologies . orient . core . db . OrientD... | org . junit . Assert . assertEquals ( ridBag , mergedRidbag ) |
testDeferredResponse ( ) { org . apache . hadoop . ipc . TestRpcServerHandoff . ServerForHandoffTest server = new org . apache . hadoop . ipc . TestRpcServerHandoff . ServerForHandoffTest ( 2 ) ; server . start ( ) ; try { java . net . InetSocketAddress serverAddress = org . apache . hadoop . net . NetUtils . getConnec... | org . junit . Assert . assertEquals ( new org . apache . hadoop . io . BytesWritable ( requestBytes ) , response ) |
testParseEmptyString ( ) { org . junit . Assume . assumeThat ( valueSemanticsProvider . getParser ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . not ( org . hamcrest . CoreMatchers . nullValue ( ) ) ) ) ; final java . lang . Object newValue = valueSemanticsProvider . parseTextEntry ( null , ... | org . junit . Assert . assertNull ( newValue ) |
createWriter_NullForUnseenType ( ) { org . locationtech . geowave . core . store . api . Writer < java . lang . Object > writer = dataStore . createWriter ( MOCK_DATA_TYPE_1 ) ; "<AssertPlaceHolder>" ; } createWriter ( java . lang . String ) { final java . lang . Short adapterId = internalAdapterStore . getAdapterId ( ... | org . junit . Assert . assertNull ( writer ) |
testToString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "SSL2ServerHelloMessage:" ) ; sb . append ( "\n<sp>Protocol<sp>Version:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>Type:<sp>" ) . append ( "null" ) ; sb . append ( "\n<sp>Supported<sp>CipherSuites:<sp>" ) . ap... | org . junit . Assert . assertEquals ( message . toString ( ) , sb . toString ( ) ) |
character_type_request_returns_a_character ( ) { java . lang . Object result = this . characterGenerator . create ( com . flextrade . jfixture . builders . Character . class , null ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Object , com . flextrade . jfixture . SpecimenContext ) { if ( ! ( request instanceof ... | org . junit . Assert . assertTrue ( ( result instanceof java . lang . Character ) ) |
testParseDbPointerInArray ( ) { final com . allanbank . mongodb . bson . json . JsonParser parser = new com . allanbank . mongodb . bson . json . JsonParser ( ) ; final java . lang . Object doc = parser . parse ( "{<sp>a<sp>:<sp>[DBPointer(\'db\',<sp>\"collection\",<sp>ObjectId(\'4e9d87aa5825b60b637815a6\'))]}" ) ; fin... | org . junit . Assert . assertEquals ( b . build ( ) , doc ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . enrolment . foreign . type . EnrolmentForeignType context = new org . lnu . is . domain . enrolment . foreign . type . EnrolmentForeignType ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>EnrolmentForei... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
whenCalledWithNullArgument ( ) { com . hazelblast . client . impl . LoadBalanced_Test . TestService proxy = proxyProvider . getProxy ( com . hazelblast . client . impl . LoadBalanced_Test . TestService . class ) ; java . lang . String arg = "foo" ; java . lang . String result = "result" ; when ( testServiceMock . multi... | org . junit . Assert . assertEquals ( result , found ) |
testSetPeerProposalFailure ( ) { doThrow ( new java . lang . InterruptedException ( ) ) . when ( this . listenableFutureMock ) . get ( ) ; final org . opendaylight . bgpcep . pcep . topology . provider . PCEPStatefulPeerProposal peerProposal = org . opendaylight . bgpcep . pcep . topology . provider . PCEPStatefulPeerP... | org . junit . Assert . assertNull ( this . tlvsBuilder . augmentation ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . controller . pcep . sync . optimizations . rev181109 . Tlvs3 . class ) ) |
test_frozen_before_migration_destination ( ) { com . noctarius . snowcast . impl . NodeSequencerService sequencerService = new com . noctarius . snowcast . impl . NodeSequencerService ( ) ; com . noctarius . snowcast . impl . SequencerPartition partition = sequencerService . getSequencerPartition ( 1 ) ; com . hazelcas... | org . junit . Assert . assertTrue ( partition . isFrozen ( ) ) |
pair ( ) { com . gs . collections . impl . test . domain . Person john = new com . gs . collections . impl . test . domain . Person ( "John" , "Smith" ) ; com . gs . collections . impl . test . domain . Person jane = new com . gs . collections . impl . test . domain . Person ( "Jane" , "Smith" ) ; com . gs . collection... | org . junit . Assert . assertEquals ( com . gs . collections . impl . list . mutable . FastList . newListWith ( johnDoe , jane , john ) , sorted ) |
testAddLinkSuccess ( ) { target = org . powermock . api . mockito . PowerMockito . spy ( new org . o3project . odenos . core . util . PathCalculator ( ) ) ; org . o3project . odenos . core . component . network . topology . Link link = new org . o3project . odenos . core . component . network . topology . Link ( "0" , ... | org . junit . Assert . assertThat ( target . addLink ( link ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testCreateNonRecursiveFunctionality ( ) { if ( inputFileAlreadyExist ) { org . apache . hadoop . fs . FileSystem . create ( adlStore , inputFileName , inputPermission ) ; } if ( inputParentAlreadyExist ) { adlStore . mkdirs ( inputFileName . getParent ( ) ) ; } else { adlStore . delete ( inputFileName . getParent ( ) ,... | org . junit . Assert . assertEquals ( expectedExceptionType , e . getClass ( ) ) |
testCreateMoreThanMaxCapacity ( ) { final org . apache . nifi . wali . BlockingQueuePool < java . util . concurrent . atomic . AtomicBoolean > pool = new org . apache . nifi . wali . BlockingQueuePool ( 10 , AtomicBoolean :: new , AtomicBoolean :: get , org . apache . nifi . wali . TestBlockingQueuePool . DO_NOTHING ) ... | org . junit . Assert . assertNotNull ( value ) |
shouldMergeIdsInto ( ) { long [ ] values = new long [ ] { 2 , 4 , 10 , 11 , 14 } ; long [ ] into = new long [ ] { 1 , 5 , 6 , 11 , 25 } ; int intoLengthBefore = into . length ; into = java . util . Arrays . copyOf ( into , ( ( into . length ) + ( values . length ) ) ) ; org . neo4j . unsafe . impl . batchimport . Utils... | org . junit . Assert . assertArrayEquals ( new long [ ] { 1 , 2 , 4 , 5 , 6 , 10 , 11 , 11 , 14 , 25 } , into ) |
computeEndTimeForPaymentPreview_InvokeBeforeLastTimeSliceOverlappingBillingEnd2 ( ) { long endTimeForPeriod = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-01-30<sp>01:59:00" ) ; long endTimeForBilling = org . oscm . test . DateTimeHandling . calculateMillis ( "2013-02-01<sp>00:00:00" ) ; long endTime ... | org . junit . Assert . assertEquals ( org . oscm . test . DateTimeHandling . calculateMillis ( "2013-02-01<sp>00:00:00" ) , endTime ) |
testPut ( ) { int found = org . apache . flume . channel . recoverable . memory . TestRecoverableMemoryChannel . takeEvents ( channel , 1 , 5 ) . size ( ) ; "<AssertPlaceHolder>" ; org . apache . flume . channel . recoverable . memory . TestRecoverableMemoryChannel . putEvents ( channel , "unbatched" , 1 , 5 ) ; org . ... | org . junit . Assert . assertEquals ( 0 , found ) |
testEncodeComplexSequence ( ) { org . wildfly . security . asn1 . DEREncoder encoder = new org . wildfly . security . asn1 . DEREncoder ( ) ; encoder . startSequence ( ) ; encoder . encodeIA5String ( "test<sp>string" ) ; encoder . encodeOctetString ( new byte [ ] { 1 , 35 , 69 , 103 , - 119 , - 85 , - 51 , - 17 } ) ; e... | org . junit . Assert . assertArrayEquals ( expected , encoder . getEncoded ( ) ) |
testJan1900Previous ( ) { org . jfree . data . time . Month previous = ( ( org . jfree . data . time . Month ) ( this . jan1900 . previous ( ) ) ) ; "<AssertPlaceHolder>" ; } previous ( ) { org . jfree . data . time . Month result ; if ( ( this . month ) != ( org . jfree . date . MonthConstants . JANUARY ) ) { result =... | org . junit . Assert . assertNull ( previous ) |
shouldMatchesGivenEqualTypeOfElement ( ) { uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField collectionOfMocksField = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( java . util . Collections . emptySet ( ) , java . util . Set . class , uk . co . webamoeba... | org . junit . Assert . assertFalse ( matches ) |
testGetStringOfDocumentAndGetXMLDocument ( ) { org . w3c . dom . Document document = xmlHelpers . getXMLDocumentOfSAMLMessage ( message ) ; java . lang . String mess = xmlHelpers . getStringOfDocument ( document , 2 , true ) ; org . w3c . dom . Document document2 = xmlHelpers . getXMLDocumentOfSAMLMessage ( mess ) ; "<... | org . junit . Assert . assertEquals ( message , xmlHelpers . getStringOfDocument ( document2 , 0 , false ) ) |
basicRefresh ( ) { doReturn ( voidFuture ) . when ( manager ) . refreshDiscovery ( any ( java . lang . String . class ) ) ; "<AssertPlaceHolder>" ; verify ( manager ) . refreshDiscovery ( any ( java . lang . String . class ) ) ; verify ( reporter , times ( 0 ) ) . reportClusterNodeRpcError ( ) ; verify ( reporter , tim... | org . junit . Assert . assertEquals ( voidFuture , manager . refresh ( ) ) |
testProtocoloGetLinhaGetGetErrado ( ) { br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet obj = null ; try { obj = new br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet ( "POST<sp>/<sp>http/1.1" , br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGetTest . HOST_WWW_EXAMPLE_COM ) ; org . jun... | org . junit . Assert . assertTrue ( true ) |
testRequestThatCannotBeServedFromCacheCausesBackendRequest ( ) { cacheInvalidatorWasCalled ( ) ; requestPolicyAllowsCaching ( false ) ; mockImplMethods ( org . apache . hc . client5 . http . impl . cache . TestCachingExec . CALL_BACKEND ) ; implExpectsAnyRequestAndReturn ( mockBackendResponse ) ; requestIsFatallyNonCom... | org . junit . Assert . assertSame ( mockBackendResponse , result ) |
shouldReturnTrueWhenCollectionContainsAProvidedValue ( ) { final java . util . Collection collection = com . google . common . collect . Sets . newHashSet ( 10 , 20 , 2 , 30 ) ; final java . lang . Object [ ] values = new java . lang . Object [ ] { 1 , 2 , 3 } ; final boolean result = uk . gov . gchq . gaffer . commonu... | org . junit . Assert . assertTrue ( result ) |
testGetDisplay_1 ( ) { org . jinstagram . auth . model . OAuthConfig fixture = new org . jinstagram . auth . model . OAuthConfig ( "key" , "secret" , "callback" , "scope" , "display" ) ; fixture . setRequestProxy ( org . jinstagram . auth . model . OAuthConfigTest . proxy ) ; java . lang . String result = fixture . get... | org . junit . Assert . assertNotNull ( result ) |
testVerstrekkingsbeperkingOpPartijMaarNietMogelijk ( ) { final nl . bzk . brp . model . algemeen . stamgegeven . kern . Partij partij = nl . bzk . brp . business . regels . impl . levering . definitieregels . BRLV0035Test . VERSTREKKINGSBEPERKING_MOGELIJK_NEE_PARTIJ ; voegVerstrekkingsbeperkingToeAanPersoonVoorPartij (... | org . junit . Assert . assertFalse ( verstrekkingsbeperkingAanwezig ) |
testUpdateTwoDates ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . BaseDaoImplTest . TwoDates , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . BaseDaoImplTest . TwoDates . class , true ) ; com . j256 . ormlite . dao . BaseDaoImplTest . TwoDates foo = new com . j256 . ormlit... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testUpdateSeriesPropertiesJson ( ) { final java . lang . String updatedProperties = "{\"live\":true,\"ondemand\":\"true\"}" ; final java . lang . String response = io . restassured . RestAssured . given ( ) . pathParam ( "seriesId" , "4fd0ef66-aea5-4b7a-a62a-a4ada0eafd6f" ) . formParam ( "properties" , updatedPropertie... | org . junit . Assert . assertEquals ( org . opencastproject . external . endpoint . SeriesEndpointTest . parser . parse ( updatedProperties ) , json ) |
jaxbNVOrdered ( ) { org . ebayopensource . turmeric . runtime . tests . service1 . sample . types1 . MyMessage msg = org . ebayopensource . turmeric . runtime . tests . common . util . TestUtils . createTestMessage ( 1 ) ; org . ebayopensource . turmeric . runtime . common . binding . DataBindingDesc dbDesc = new org .... | org . junit . Assert . assertEquals ( msg , msg1 ) |
testGeometricDistribution ( ) { org . streaminer . stream . frequency . topk . StreamSummary < java . lang . Integer > vs = new org . streaminer . stream . frequency . topk . StreamSummary < java . lang . Integer > ( 10 ) ; cern . jet . random . engine . RandomEngine re = cern . jet . random . engine . RandomEngine . m... | org . junit . Assert . assertEquals ( 0 , ( ( int ) ( tippyTop . getItem ( ) ) ) ) |
checkAbilityToStartDefaultService ( ) { service = io . appium . java_client . service . local . AppiumDriverLocalService . buildDefaultService ( ) ; service . start ( ) ; "<AssertPlaceHolder>" ; } isRunning ( ) { lock . lock ( ) ; try { if ( ( process ) == null ) { return false ; } if ( ! ( process . isRunning ( ) ) ) ... | org . junit . Assert . assertTrue ( service . isRunning ( ) ) |
testWriteUnordered ( ) { final java . lang . String collectionName = "testWriteUnordered" ; org . bson . Document doc = org . bson . Document . parse ( "{\"_id\":\"521df3a4300466f1f2b5ae82\",\"scientist\":\"Test<sp>%s\"}" ) ; pipeline . apply ( org . apache . beam . sdk . transforms . Create . of ( doc , doc ) ) . appl... | org . junit . Assert . assertEquals ( 1 , org . apache . beam . sdk . io . mongodb . MongoDbIOTest . countElements ( collectionName ) ) |
reverseGetNonexistingReturnsNull ( ) { "<AssertPlaceHolder>" ; } reverseGet ( V ) { return reverseMap . get ( value ) ; } | org . junit . Assert . assertNull ( subject . reverseGet ( value ) ) |
testStoreAndGetDocument ( ) { org . modeshape . jcr . index . elasticsearch . client . EsRequest doc = new org . modeshape . jcr . index . elasticsearch . client . EsRequest ( ) ; doc . put ( "field1" , "value1" ) ; client . storeDocument ( org . modeshape . jcr . index . elasticsearch . client . EsClientTest . INDEX_N... | org . junit . Assert . assertEquals ( doc . get ( "field1" ) , doc1 . get ( "field1" ) ) |
testImageFileTwo ( ) { byte [ ] data = net . magja . utils . MagjaFileUtils . getBytesFromBufferedImage ( image , "PNG" ) ; "<AssertPlaceHolder>" ; } getBytesFromBufferedImage ( java . awt . image . BufferedImage , java . lang . String ) { java . io . ByteArrayOutputStream buff = new java . io . ByteArrayOutputStream (... | org . junit . Assert . assertNotNull ( data ) |
testCompareToEqualVersion ( ) { org . eclipse . winery . common . version . WineryVersion smaller = new org . eclipse . winery . common . version . WineryVersion ( "1.6.3" , 4 , 8 ) ; org . eclipse . winery . common . version . WineryVersion greater = new org . eclipse . winery . common . version . WineryVersion ( "1.6... | org . junit . Assert . assertEquals ( 0 , smaller . compareTo ( greater ) ) |
testMultiNormalizerHybridEmpty ( ) { org . nd4j . linalg . dataset . MultiNormalizerHybrid original = new org . nd4j . linalg . dataset . MultiNormalizerHybrid ( ) ; original . setInputStats ( new java . util . HashMap < java . lang . Integer , org . nd4j . linalg . dataset . api . preprocessor . stats . NormalizerStat... | org . junit . Assert . assertEquals ( original , restored ) |
makeFsEntryKeyTest ( ) { final byte [ ] path = "goats/goats/goats" . getBytes ( ) ; final int dir_index = 123456 ; final byte [ ] img_md5 = new byte [ ] { ( ( byte ) ( 160 ) ) , ( ( byte ) ( 121 ) ) , ( ( byte ) ( 196 ) ) , ( ( byte ) ( 231 ) ) , ( ( byte ) ( 121 ) ) , ( ( byte ) ( 205 ) ) , ( ( byte ) ( 153 ) ) , ( ( ... | org . junit . Assert . assertArrayEquals ( expected , makeFsEntryKey ( img_md5 , path , dir_index ) ) |
canUpdateSettingsInPlace ( ) { org . infinitest . InfinitestSettings . InfinitestSettings settings = new org . infinitest . InfinitestSettings . InfinitestSettings ( ) ; settings . setIsInfinitestEnabled ( false ) ; "<AssertPlaceHolder>" ; } isInfinitestEnabled ( ) { return java . lang . Boolean . parseBoolean ( proper... | org . junit . Assert . assertFalse ( settings . isInfinitestEnabled ( ) ) |
testFeedForwardWithKeyGraph ( ) { org . deeplearning4j . nn . conf . ComputationGraphConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . weightInit ( WeightInit . XAVIER ) . graphBuilder ( ) . addInputs ( "in1" , "in2" ) . addLayer ( "0" , new org . deeplearning4j . spark ... | org . junit . Assert . assertEquals ( exp , act ) |
wrongPasswordDeprecated ( ) { final org . apache . logging . log4j . core . net . ssl . TrustStoreConfiguration ksc = new org . apache . logging . log4j . core . net . ssl . TrustStoreConfiguration ( TestConstants . TRUSTSTORE_FILE , "wrongPassword!" . toCharArray ( ) , null , null ) ; ksc . getKeyStore ( ) ; "<AssertP... | org . junit . Assert . assertTrue ( false ) |
testResetAttr ( ) { element . setAttribute ( "fill" , "yellow" ) ; element . getAttribute ( "fill" ) . set ( "red" ) ; "<AssertPlaceHolder>" ; } get ( ) { return handlersKeySet ( ) ; } | org . junit . Assert . assertTrue ( element . getAttribute ( "fill" ) . get ( ) . equals ( "red" ) ) |
printsOutRegexMatchingRules ( ) { com . facebook . buck . tools . consistency . RuleKeyLogFilePrinter printer = new com . facebook . buck . tools . consistency . RuleKeyLogFilePrinter ( stream , reader , java . util . Optional . of ( java . util . regex . Pattern . compile ( "//.*test.*" ) ) , java . util . Optional . ... | org . junit . Assert . assertEquals ( 9 , lines . length ) |
test_DoublesPair_of_PairNumberNumber_DoublesPair ( ) { org . testng . eclipse . convert . DoublesPair base = org . testng . eclipse . convert . DoublesPair . of ( 1.2 , 2.5 ) ; org . testng . eclipse . convert . DoublesPair test = org . testng . eclipse . convert . DoublesPair . ofNumbers ( base ) ; "<AssertPlaceHolder... | org . junit . Assert . assertSame ( base , test ) |
mkString_A$String$String$String ( ) { com . m3 . scalaflavor4j . Seq < java . lang . String > seq = com . m3 . scalaflavor4j . Seq . apply ( "090" , "1111" , "2222" ) ; java . lang . String start = "Tel:" ; java . lang . String sep = "-" ; java . lang . String end = "" ; java . lang . String actual = seq . mkString ( s... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testWrite_05 ( ) { filterStream . write ( ( "*\n<sp>*<sp>$Id" + "$" ) . getBytes ( ) ) ; filterStream . flush ( ) ; java . lang . String res = new java . lang . String ( result . toByteArray ( ) ) ; java . lang . String expected = "*\n" ; "<AssertPlaceHolder>" ; } toByteArray ( ) { return this . buf ; } | org . junit . Assert . assertEquals ( expected , res ) |
dataPointsCollectionFieldsShouldBeRecognized ( ) { java . util . List < org . junit . experimental . theories . PotentialAssignment > assignments = org . junit . tests . experimental . theories . TheoryTestUtils . potentialAssignments ( org . junit . tests . experimental . theories . internal . AllMembersSupplierTest .... | org . junit . Assert . assertEquals ( 2 , assignments . size ( ) ) |
flatMapPrecedence ( ) { com . jnape . palatable . lambda . adt . hlist . Tuple5 < java . lang . String , java . lang . Integer , java . lang . Integer , java . lang . Integer , java . lang . Integer > a = com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 2 , 3 , 4 ) ; java . util . function .... | org . junit . Assert . assertEquals ( com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 2 , 3 , 5 ) , a . flatMap ( b ) ) |
testGeefGroepenVanElement ( ) { java . util . Collection < nl . bzk . brp . domain . leveringmodel . MetaGroep > groepenVanElement = modelAanwijzer . geefGroepenVanElement ( getGroepElement ( Element . PERSOON_ADRES_STANDAARD . getId ( ) ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; } | org . junit . Assert . assertFalse ( groepenVanElement . isEmpty ( ) ) |
describeWorkspaces ( ) { software . amazon . awssdk . services . workspaces . model . DescribeWorkspacesResponse result = client . describeWorkspaces ( software . amazon . awssdk . services . workspaces . model . DescribeWorkspacesRequest . builder ( ) . build ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return map ... | org . junit . Assert . assertTrue ( result . workspaces ( ) . isEmpty ( ) ) |
jsonObject_notEqual_locale ( ) { org . oscm . json . JsonObject jsonObject1 = givenJsonObject ( ) ; org . oscm . json . JsonObject jsonObject2 = givenJsonObject ( ) ; jsonObject2 . setLocale ( ( ( jsonObject1 . getLocale ( ) ) + "changed" ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) =... | org . junit . Assert . assertFalse ( jsonObject1 . equals ( jsonObject2 ) ) |
testZeroBaselineRateShouldBeUndefined ( ) { org . drugis . addis . entities . RateMeasurement base = new org . drugis . addis . entities . BasicRateMeasurement ( 0 , 100 ) ; org . drugis . addis . entities . RateMeasurement subj = new org . drugis . addis . entities . BasicRateMeasurement ( 50 , 100 ) ; org . drugis . ... | org . junit . Assert . assertFalse ( or . isDefined ( ) ) |
whenDefaults ( ) { final java . lang . Class < ? > cls = org . apache . isis . core . metamodel . facets . object . domainobjectlayout . DomainObjectLayoutFactoryTest . CustomerViewModelWithDefaults . class ; facetFactory . process ( new org . apache . isis . core . metamodel . facets . FacetFactory . ProcessClassConte... | org . junit . Assert . assertNull ( facet ) |
testGetConversionCache ( ) { System . out . println ( "getConversionCache" ) ; OpenRate . resource . ConversionCache result = OpenRate . utils . ConversionUtils . getConversionCache ( ) ; "<AssertPlaceHolder>" ; } getConversionCache ( ) { if ( ( OpenRate . utils . ConversionUtils . tmpConvCache ) == null ) { OpenRate .... | org . junit . Assert . assertNotNull ( result ) |
testMultipleAirthamatic ( ) { org . eclipse . jetty . client . api . ContentResponse response = org . teiid . olingo . TestODataIntegration . http . GET ( ( ( ( org . teiid . olingo . TestODataIntegration . baseURL ) + "/loopy/pm1/G1?$filter=" ) + ( org . apache . olingo . commons . core . Encoder . encode ( "e2<sp>eq<... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
testEquals_true ( ) { org . jenkinsci . plugins . GithubSecurityRealm a = new org . jenkinsci . plugins . GithubSecurityRealm ( "http://jenkins.acme.com" , "http://jenkins.acme.com/api/v3" , "someid" , "somesecret" , "read:org" ) ; org . jenkinsci . plugins . GithubSecurityRealm b = new org . jenkinsci . plugins . Gith... | org . junit . Assert . assertTrue ( a . equals ( b ) ) |
shouldTechnologyHasCorrectState ( ) { given ( costCalculation . getBelongsToField ( CostCalculationFields . TECHNOLOGY ) ) . willReturn ( technology ) ; given ( technology . getStringField ( TechnologyFields . STATE ) ) . willReturn ( TechnologyStateStringValues . CHECKED ) ; boolean result = costCalculationValidators ... | org . junit . Assert . assertTrue ( result ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.