input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
messageArrivedShouldShowMessageAndNotifyUserInterfaceButNotSetNewMessageFlagWhenNotVisible ( ) { setUpExistingUser ( ) ; when ( userInterface . isVisible ( ) ) . thenReturn ( false ) ; when ( userInterface . isFocused ( ) ) . thenReturn ( false ) ; responder . messageArrived ( 100 , "msg3" , 200 ) ; verify ( messageCon... | org . junit . Assert . assertFalse ( me . isNewMsg ( ) ) |
testReflect2 ( ) { com . ibm . wala . ipa . callgraph . AnalysisScope scope = com . ibm . wala . core . tests . callGraph . ReflectionTest . findOrCreateAnalysisScope ( ) ; com . ibm . wala . ipa . cha . IClassHierarchy cha = com . ibm . wala . core . tests . callGraph . ReflectionTest . findOrCreateCHA ( scope ) ; jav... | org . junit . Assert . assertFalse ( nodes . isEmpty ( ) ) |
testGetLocaleWhenEmpty ( ) { java . util . Locale . setDefault ( defaultLocale ) ; properties . put ( "locale" , "" ) ; userTaskPageProviver . setProperties ( properties ) ; "<AssertPlaceHolder>" ; } getLocale ( ) { return locale ; } | org . junit . Assert . assertEquals ( defaultLocale , userTaskPageProviver . getLocale ( ) ) |
testMatchFilter ( ) { org . eclipse . linuxtools . systemtap . graphing . core . filters . MatchFilter filter = new org . eclipse . linuxtools . systemtap . graphing . core . filters . MatchFilter ( ( - 1 ) , null , org . eclipse . linuxtools . systemtap . graphing . core . filters . MatchFilter . KEEP_MATCHING ) ; "<A... | org . junit . Assert . assertNotNull ( filter ) |
testObjectFunctionCallNoParameters ( ) { v8 . executeVoidScript ( "function<sp>foo()<sp>{return<sp>{bar:8};}" ) ; com . eclipsesource . v8 . V8Array parameters = new com . eclipsesource . v8 . V8Array ( v8 ) ; com . eclipsesource . v8 . V8Object result = v8 . executeObjectFunction ( "foo" , parameters ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( 8 , result . getInteger ( "bar" ) ) |
testFindFromClasspath ( ) { org . pf4j . ExtensionFinder instance = new org . pf4j . AbstractExtensionFinder ( pluginManager ) { @ org . pf4j . Override public java . util . Map < java . lang . String , java . util . Set < java . lang . String > > readPluginsStorages ( ) { return java . util . Collections . emptyMap ( ... | org . junit . Assert . assertEquals ( 2 , list . size ( ) ) |
testRemoveAggregation_emptyRepository_assertExcpetion ( ) { final org . nhindirect . monitor . dao . entity . Aggregation remove = new org . nhindirect . monitor . dao . entity . Aggregation ( ) ; remove . setExchangeBlob ( new byte [ ] { 0 , 3 , 2 } ) ; remove . setId ( "12345" ) ; remove . setVersion ( 0 ) ; boolean ... | org . junit . Assert . assertTrue ( exceptionOccured ) |
testRegistration ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( service ) |
refinementCardinalityExactlyOne ( ) { generateDrugHierarchy ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[1..1]<sp>%s=<%s" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2internation... | org . junit . Assert . assertEquals ( expected , actual ) |
testItemCollectionRawtype ( ) { org . imixs . workflow . ItemCollection itemCollection = new org . imixs . workflow . ItemCollection ( ) ; itemCollection . replaceItemValue ( "txtTitel" , "Hello" ) ; double d = 5.2 ; itemCollection . replaceItemValue ( "price" , d ) ; byte [ ] bytes = "Some<sp>Data" . getBytes ( ) ; it... | org . junit . Assert . assertNotNull ( itemCollection ) |
testIllegalSpdyRstStreamFrameStatusCode ( ) { short type = 3 ; byte flags = 0 ; int length = 8 ; int streamId = ( ( io . netty . handler . codec . spdy . SpdyFrameDecoderTest . RANDOM . nextInt ( ) ) & 2147483647 ) | 1 ; int statusCode = 0 ; io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ... | org . junit . Assert . assertFalse ( buf . isReadable ( ) ) |
shouldNotBeInitializedIfChangelogPartitionsIsNonEmpty ( ) { final org . apache . kafka . streams . processor . internals . StreamTask task = createStatefulTask ( createConfig ( false ) , true ) ; "<AssertPlaceHolder>" ; } initializeStateStores ( ) { log . trace ( "Initializing<sp>state<sp>stores" ) ; registerStateStore... | org . junit . Assert . assertFalse ( task . initializeStateStores ( ) ) |
testTopK ( ) { com . clearspring . analytics . stream . StreamSummary < java . lang . String > vs = new com . clearspring . analytics . stream . StreamSummary < java . lang . String > ( 3 ) ; java . lang . String [ ] stream = new java . lang . String [ ] { "X" , "X" , "Y" , "Z" , "A" , "B" , "C" , "X" , "X" , "A" , "C"... | org . junit . Assert . assertTrue ( java . util . Arrays . asList ( "A" , "C" , "X" ) . contains ( c . getItem ( ) ) ) |
testGetDescription ( ) { java . lang . String actual = ServerCapability . PLC . getDescription ( ) ; java . lang . String expected = "Supports<sp>the<sp>PLCopen<sp>information<sp>model." ; "<AssertPlaceHolder>" ; } getDescription ( ) { return description ; } | org . junit . Assert . assertEquals ( expected , actual ) |
shouldNotRollDateForwardWhenItMatchesDayOfWeek ( ) { org . joda . time . DateTime firstOfNextMonth = new org . joda . time . DateTime ( ) . plusMonths ( 1 ) . withDayOfMonth ( 1 ) . toDateMidnight ( ) . toDateTime ( ) ; org . joda . time . DateTime firstThursdayOfNextMonth = firstOfNextMonth . withDayOfWeek ( org . mif... | org . junit . Assert . assertThat ( adjustedDate , org . hamcrest . CoreMatchers . is ( firstThursdayOfNextMonth ) ) |
test6 ( ) { java . lang . String [ ] vars = new java . lang . String [ ] { "a" , "b" , "c" , "d" , "e" , "f" , "g" , "h" } ; for ( cc . redberry . rings . Ring < cc . redberry . rings . bigint . BigInteger > ring : java . util . Arrays . < cc . redberry . rings . Ring < cc . redberry . rings . bigint . BigInteger > > a... | org . junit . Assert . assertEquals ( expected , cc . redberry . rings . poly . multivar . MultivariateSquareFreeFactorization . SquareFreeFactorization ( poly ) ) |
testIsArchived ( ) { net . rcarz . jiraclient . Version version = new net . rcarz . jiraclient . Version ( null , getTestJSON ( ) ) ; "<AssertPlaceHolder>" ; } isArchived ( ) { return archived ; } | org . junit . Assert . assertFalse ( version . isArchived ( ) ) |
getAliasSuffix ( ) { when ( wikiConfiguration . getAliasSuffix ( ) ) . thenReturn ( "mysuffix.org" ) ; "<AssertPlaceHolder>" ; } getAliasSuffix ( ) { when ( configuration . getProperty ( "wiki.alias.suffix" , "" ) ) . thenReturn ( "xwiki.org" ) ; org . junit . Assert . assertEquals ( "xwiki.org" , mocker . getComponent... | org . junit . Assert . assertEquals ( mocker . getComponentUnderTest ( ) . getAliasSuffix ( ) , "mysuffix.org" ) |
testTransactionJoinIfPossible ( ) { org . mule . runtime . core . api . transaction . MuleTransactionConfig txConfig = new org . mule . runtime . core . api . transaction . MuleTransactionConfig ( TransactionConfig . ACTION_JOIN_IF_POSSIBLE ) ; txConfig . setMuleContext ( muleContext ) ; txConfig . setFactory ( new org... | org . junit . Assert . assertFalse ( txConfig . isTransacted ( ) ) |
testWSDLRequestNoWSDL ( ) { when ( httpServletResponse . getOutputStream ( ) ) . thenReturn ( sos ) ; handler . handle ( "/wsdl/foooooooo.wsdl" , request , request , httpServletResponse ) ; "<AssertPlaceHolder>" ; verify ( httpServletResponse ) . setStatus ( HttpServletResponse . SC_NOT_FOUND ) ; logCheck ( ) ; } isHan... | org . junit . Assert . assertTrue ( request . isHandled ( ) ) |
shouldReturnPodTemplateWhenParentIsNull ( ) { org . csanchez . jenkins . plugins . kubernetes . PodTemplate template = new org . csanchez . jenkins . plugins . kubernetes . PodTemplate ( ) ; template . setName ( "template" ) ; template . setServiceAccount ( "sa1" ) ; org . csanchez . jenkins . plugins . kubernetes . Po... | org . junit . Assert . assertEquals ( result , template ) |
testNode ( ) { org . antlr . test . TreeAdaptor adaptor = new org . antlr . test . CommonTreeAdaptor ( ) ; org . antlr . test . TreeWizard wiz = new org . antlr . test . TreeWizard ( adaptor , org . antlr . test . TestTreeIterator . tokens ) ; org . antlr . test . CommonTree t = ( ( org . antlr . test . CommonTree ) ( ... | org . junit . Assert . assertEquals ( expecting , found ) |
moreThanOneStreamCommentsSecondFail ( ) { java . lang . String script = "#Comment<sp>1\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( "\tconnect<sp>\'tcp://localhost:8080\'<sp>#comment<sp>2\n" + "\tclose\n" 4 ) + "\t#comment<sp>3\n" ) + "\tclose\n" ) + "\tclose\n" 2 ) + "\tclose\n" 1 ) + "\t#comment<sp>4\n" ) + "\tconnect<sp>\'tcp://l... | org . junit . Assert . assertEquals ( expectedScript , observedScript ) |
testForCharArray ( ) { java . lang . String [ ] strArr = new java . lang . String [ 2 ] ; strArr [ 0 ] = "a" ; strArr [ 1 ] = "d" ; org . apache . phoenix . schema . types . PhoenixArray arr = org . apache . phoenix . schema . types . PArrayDataType . instantiatePhoenixArray ( PChar . INSTANCE , strArr ) ; byte [ ] byt... | org . junit . Assert . assertEquals ( arr , resultArr ) |
testValid ( ) { java . util . Set < javax . validation . ConstraintViolation < com . cloudera . parcel . descriptors . AlternativesDescriptor > > violations = validator . getViolations ( com . cloudera . parcel . validation . ParcelTestUtils . getParserAlternativesJson ( "good_alternatives.json" ) ) ; "<AssertPlaceHold... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
testParseIonic_StatisticalUnit ( ) { final java . lang . String [ ] properties = new java . lang . String [ ] { "unitId" , "typeAbbreviation" , "instanceName" , "geometry" } ; final javax . xml . namespace . QName featureName = org . geotools . data . wfs . v1_1_0 . DataTestSupport . IONIC_STATISTICAL_UNIT . TYPENAME ;... | org . junit . Assert . assertEquals ( ( - 1 ) , nof ) |
testZeroOne ( ) { java . lang . String numA = "0" ; java . lang . String numB = "1" ; java . lang . String res = "1" ; java . math . BigInteger aNumber = new java . math . BigInteger ( numA ) ; java . math . BigInteger bNumber = new java . math . BigInteger ( numB ) ; java . math . BigInteger result = aNumber . xor ( b... | org . junit . Assert . assertTrue ( res . equals ( result . toString ( ) ) ) |
testSubtractMinute ( ) { java . lang . String str1 = "2015-02-23<sp>18:54:00" ; java . lang . String str2 = "2015-02-23<sp>18:55:22" ; int rs = com . opslab . util . DateUtil . subtractMinute ( str1 , str2 ) ; "<AssertPlaceHolder>" ; } subtractMinute ( java . lang . String , java . lang . String ) { int rs = 0 ; try { ... | org . junit . Assert . assertEquals ( "" , 1 , rs ) |
testStickyForceCheck ( ) { int count = testSticky ( null , true ) ; "<AssertPlaceHolder>" ; } testSticky ( java . lang . String , boolean ) { if ( methodName == null ) { url = url . addParameter ( Constants . CLUSTER_STICKY_KEY , java . lang . String . valueOf ( check ) ) ; } else { url = url . addParameter ( ( ( metho... | org . junit . Assert . assertTrue ( ( ( count == 0 ) || ( count == ( runs ) ) ) ) |
testUnknownFrontendUrlWithNoMapping ( ) { java . util . Map < java . net . URI , java . net . URI > emptyMap = new java . util . HashMap ( ) ; when ( graphiteSources . getIpportsByUrl ( ) ) . thenReturn ( new java . util . HashMap ( ) ) ; when ( this . graphiteSources . getSources ( ) ) . thenReturn ( new java . util .... | org . junit . Assert . assertEquals ( com . vsct . supervision . notification . model . AlarmMapperTest . OTHER_GRAPHITE_URL , backendAlarm . getGraphiteBaseUrl ( ) ) |
test_RcDownloadOperation ( ) { com . hazelcast . simulator . coordinator . operations . RcDownloadOperation op = new com . hazelcast . simulator . coordinator . operations . RcDownloadOperation ( ) ; java . lang . String result = remote . execute ( op ) ; "<AssertPlaceHolder>" ; verify ( coordinator ) . download ( ) ; ... | org . junit . Assert . assertNull ( result ) |
testClone ( ) { com . google . zxing . common . BitArray array = new com . google . zxing . common . BitArray ( 32 ) ; array . clone ( ) . set ( 0 ) ; "<AssertPlaceHolder>" ; } get ( int ) { return ( ( bits [ ( i / 32 ) ] ) & ( 1 << ( i & 31 ) ) ) != 0 ; } | org . junit . Assert . assertFalse ( array . get ( 0 ) ) |
whenLog2DoubleValues_shouldog2ThemAndReturnTheResultForFloorRounding ( ) { int result = com . google . common . math . DoubleMath . log2 ( 30 , RoundingMode . FLOOR ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 4 , result ) |
convertToAndFromBigInteger ( ) { final int nTests = 10000 ; final java . util . Random rg = new java . util . Random ( ) ; for ( int i = 0 ; i < nTests ; i ++ ) { byte [ ] randomBytes = new byte [ 16 ] ; rg . nextBytes ( randomBytes ) ; java . math . BigInteger randomBigInteger = new java . math . BigInteger ( 1 , rand... | org . junit . Assert . assertEquals ( randomBigInteger , address . toBigInteger ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoTaskForm newKaleoTaskForm = addKaleoTaskForm ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoTaskForm existingKaleoTaskForm = _persistence . fetchByPrimaryKey ( newKaleoTaskForm . getPrimaryKey ( ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( existingKaleoTaskForm , newKaleoTaskForm ) |
shouldReturnEmptyWantDigestForEmptyChecksums ( ) { java . util . Set < org . dcache . util . Checksum > checksums = java . util . Collections . emptySet ( ) ; java . util . Optional < java . lang . String > wantDigest = org . dcache . util . Checksums . asWantDigest ( checksums ) ; "<AssertPlaceHolder>" ; } isPresent (... | org . junit . Assert . assertFalse ( wantDigest . isPresent ( ) ) |
testGetNullStatement ( ) { com . datastax . driver . core . PreparedStatement preparedStatement = statement . get ( ) ; org . mockito . Mockito . verify ( mock ) . get ( ) ; "<AssertPlaceHolder>" ; } get ( ) { com . datastax . driver . core . ResultSet resultSet = null ; try { resultSet = resultSetFuture . get ( ) ; } ... | org . junit . Assert . assertNull ( preparedStatement ) |
testNonExistingFileWithoutArguments ( ) { try { java . lang . String [ ] parameters = new java . lang . String [ ] { "/some/none/existing/path" } ; org . apache . commons . cli . CommandLine line = new org . apache . commons . cli . PosixParser ( ) . parse ( eu . stratosphere . client . CliFrontend . getProgramSpecific... | org . junit . Assert . assertTrue ( ( result == null ) ) |
isSubsetOf ( ) { org . eclipse . collections . api . set . sorted . ImmutableSortedSet < java . lang . Integer > set = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } isSubsetOf ( org . eclipse . collections . api . set . SetIterable ) { synchronized ( this . getLock ( ) ) { return this . getMutableSet ( ) . isSu... | org . junit . Assert . assertTrue ( set . isSubsetOf ( set ) ) |
testNoCampaigns ( ) { java . io . InputStream is = com . xrtb . common . Configuration . getInputStream ( "SampleBids/nexage.txt" ) ; com . xrtb . pojo . BidRequest request = new com . xrtb . pojo . BidRequest ( is ) ; com . xrtb . bidder . AbortableCountDownLatch latch = new com . xrtb . bidder . AbortableCountDownLat... | org . junit . Assert . assertNull ( resp ) |
testParserWriter1 ( ) { org . matsim . core . config . Config config = org . matsim . core . config . ConfigUtils . createConfig ( ) ; org . matsim . examples . TriangleScenario . setUpScenarioConfig ( config ) ; org . matsim . api . core . v01 . Scenario scenario = org . matsim . core . scenario . ScenarioUtils . crea... | org . junit . Assert . assertEquals ( checksum_ref , checksum_run ) |
parseVARIANCETest ( ) { java . lang . String operation = "VAR(COL(column1))" ; analyze . computing . ComputingParser parser = new analyze . computing . ComputingParser ( ) ; model . datafield . DataField actual = parser . parseOperation ( operation , userData ) ; model . datafield . DataField expected = new model . dat... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetInnerExpression5 ( ) { java . lang . String backText = "modify(m)<sp>{asdasdas==asdasd,<sp>asdasd" ; java . lang . String previous = "asdasd" ; "<AssertPlaceHolder>" ; } getInnerExpression ( java . lang . String ) { java . lang . String last = org . drools . eclipse . editors . completion . CompletionUtil . getL... | org . junit . Assert . assertEquals ( previous , org . drools . eclipse . editors . completion . CompletionUtil . getInnerExpression ( backText ) ) |
givenMultimatchQuery_whenDoSearch_thenAllProvidedFieldsMatch ( ) { final org . springframework . data . elasticsearch . core . query . SearchQuery searchQuery = new org . springframework . data . elasticsearch . core . query . NativeSearchQueryBuilder ( ) . withQuery ( multiMatchQuery ( "tutorial" ) . field ( "title" )... | org . junit . Assert . assertEquals ( 2 , articles . size ( ) ) |
shouldReturnFalseWhenTT2DoseIsNotGiven ( ) { boolean didRuleSucceed = rule . apply ( new org . ei . drishti . util . SafeMap ( ) . put ( "ttDose" , "tt1" ) ) ; "<AssertPlaceHolder>" ; } put ( java . lang . String , java . lang . String ) { data . put ( key , value ) ; return this ; } | org . junit . Assert . assertFalse ( didRuleSucceed ) |
deserializeArrayOfInt8 ( ) { com . facebook . buck . util . bser . BserDeserializer deserializer = new com . facebook . buck . util . bser . BserDeserializer ( BserDeserializer . KeyOrdering . UNSORTED ) ; java . util . List < java . lang . Object > deserialized = ( ( java . util . List < java . lang . Object > ) ( des... | org . junit . Assert . assertThat ( deserialized , org . hamcrest . Matchers . equalTo ( expected ) ) |
testOngeldigeAangewezenObjectOfVoorkomen_GeenPartnerEntiteit ( ) { when ( bericht . getEntiteitVoorObjectSleutel ( nl . bzk . brp . bijhouding . bericht . model . BijhoudingPersoon . class , nl . bzk . brp . bijhouding . bericht . model . CorrectieVervalGeslachtsaanduidingGerelateerdeTest . PARTNER_OBJ_SLEUTEL ) ) . th... | org . junit . Assert . assertNull ( actie . getOngeldigAangewezenObjectOfVoorkomen ( ) ) |
predecessorKeyIsCorrect ( ) { for ( java . util . Map < java . lang . Integer , java . lang . Integer > any : net . java . quickcheck . generator . CombinedGeneratorsIterables . someMaps ( net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) , net . java . quickcheck . generator . PrimitiveGenerator... | org . junit . Assert . assertEquals ( predecessorKey , map . getPredecessorKey ( entry . getKey ( ) ) ) |
testNull ( ) { org . mapstruct . ap . test . nestedproperties . simple . _target . TargetObject targetObject = SimpleMapper . MAPPER . toTargetObject ( null ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( targetObject ) |
testInit ( ) { final org . kie . workbench . common . dmn . client . editors . types . persistence . ItemDefinitionRecordEngine expectedRecordEngine = mock ( org . kie . workbench . common . dmn . client . editors . types . persistence . ItemDefinitionRecordEngine . class ) ; handler . init ( expectedRecordEngine ) ; f... | org . junit . Assert . assertEquals ( expectedRecordEngine , actualRecordEngine ) |
testValidateInvalidFunctionWithTooFewArgumentsAndOperands ( ) { net . objecthunter . exp4j . Expression exp = new net . objecthunter . exp4j . ExpressionBuilder ( "beta(1<sp>+<sp>)" ) . functions ( beta ) . build ( ) ; net . objecthunter . exp4j . ValidationResult result = exp . validate ( false ) ; "<AssertPlaceHolder... | org . junit . Assert . assertFalse ( result . isValid ( ) ) |
should_find_by_pk ( ) { com . ctp . cdi . query . test . domain . Simple simple = createSimple ( "testFindByPk" ) ; com . ctp . cdi . query . test . domain . Simple find = dao . findBy ( simple . getId ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( simple . getName ( ) , find . getName ( ) ) |
testCompareVersions ( ) { org . apache . maven . artifact . versioning . DefaultArtifactVersion newer = new org . apache . maven . artifact . versioning . DefaultArtifactVersion ( "0.25.0-alpha" ) ; org . apache . maven . artifact . versioning . DefaultArtifactVersion older = new org . apache . maven . artifact . versi... | org . junit . Assert . assertTrue ( ( ( newer . compareTo ( older ) ) > 0 ) ) |
testSetSeedDistribution ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 123 ) ; org . deeplearning4j . nn . api . Layer model = org . deeplearning4j . nn . conf . NeuralNetConfigurationTest . getLayer ( trainingSet . numInputs ( ) , trainingSet . numOutcomes ( ) , new org . deeplearning4j . nn . ... | org . junit . Assert . assertEquals ( modelWeights , modelWeights2 ) |
ReplaceGroupbyIndexTest ( ) { org . verdictdb . sqlreader . RelationStandardizer . resetItemID ( ) ; java . lang . String sql = "select<sp>ps_partkey<sp>as<sp>g,<sp>ps_supplycost<sp>as<sp>g2,<sp>count(*)<sp>as<sp>c\n" + ( "from<sp>partsupp\n" + "group<sp>by<sp>1,<sp>2" ) ; org . verdictdb . sqlreader . NonValidatingSQL... | org . junit . Assert . assertEquals ( expected , actual ) |
testRejectedOnOffAttributeTurnedOff ( ) { org . jboss . dmr . ModelNode model = new org . jboss . dmr . ModelNode ( ) ; model . get ( "monitoring" ) . set ( "off" ) ; java . util . List < java . lang . String > result = org . jboss . as . jacorb . TransformUtils . validateDeprecatedProperites ( model ) ; "<AssertPlaceH... | org . junit . Assert . assertTrue ( result . isEmpty ( ) ) |
testCanInitListened ( ) { java . net . ServerSocket ss = new java . net . ServerSocket ( 0 ) ; int port = ss . getLocalPort ( ) ; new mockit . Expectations ( org . apache . servicecomb . transport . rest . servlet . ServletConfig . class ) { { org . apache . servicecomb . transport . rest . servlet . ServletConfig . ge... | org . junit . Assert . assertTrue ( transport . canInit ( ) ) |
setAsText_shouldSetUsingUuid ( ) { org . openmrs . propertyeditor . PrivilegeEditor editor = new org . openmrs . propertyeditor . PrivilegeEditor ( ) ; editor . setAsText ( "d979d066-15e6-467c-9d4b-cb575ef97f0f" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertNotNull ( editor . getValue ( ) ) |
testAlignedResidues1 ( ) { java . lang . String result = org . biojava . nbio . structure . align . multiple . util . MultipleAlignmentWriter . toAlignedResidues ( alignment1 ) ; java . io . FileReader file = new java . io . FileReader ( "src/test/resources/testMSTA1_alnres.tsv" ) ; java . io . BufferedReader reader = ... | org . junit . Assert . assertEquals ( expected , result ) |
testConstruct_nullServiceUrl_assertIllegalArgumentException ( ) { org . apache . http . client . HttpClient client = mock ( org . apache . http . client . HttpClient . class ) ; boolean exceptionOccured = false ; try { new org . nhindirect . common . rest . MockService ( null , client ) ; } catch ( java . lang . Illega... | org . junit . Assert . assertTrue ( exceptionOccured ) |
entIsCompliantIfSocketsNotSetOnEntPool ( ) { org . candlepin . model . Consumer c = mockConsumer ( PRODUCT_1 ) ; c . setFact ( "cpu.cpu_socket(s)" , "2" ) ; org . candlepin . model . Entitlement ent = mockEntitlement ( c , PRODUCT_1 ) ; org . candlepin . model . CandlepinQuery cqmock = mock ( org . candlepin . model . ... | org . junit . Assert . assertTrue ( compliance . isEntitlementCompliant ( c , ent , new java . util . Date ( ) ) ) |
stressInstantiationWithClose ( ) { org . neo4j . kernel . impl . index . schema . SpatialIndexCacheTest . StringFactory factory = new org . neo4j . kernel . impl . index . schema . SpatialIndexCacheTest . StringFactory ( ) ; org . neo4j . kernel . impl . index . schema . SpatialIndexCache < java . lang . String > cache... | org . junit . Assert . assertEquals ( instantiatedAtClose . intValue ( ) , count ( cache ) ) |
getRootCauseMidCycleTest ( ) { java . lang . Exception rootCause = new org . threadly . util . SuppressedStackRuntimeException ( ) ; java . lang . Exception e = new org . threadly . util . SuppressedStackRuntimeException ( org . threadly . util . ExceptionUtilsTest . makeCycle ( rootCause ) ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertTrue ( ( ( org . threadly . util . ExceptionUtils . getRootCause ( e ) ) == rootCause ) ) |
testCountMaxValue ( ) { long count = com . annimon . stream . Stream . range ( ( ( Long . MAX_VALUE ) - 100 ) , Long . MAX_VALUE ) . count ( ) ; "<AssertPlaceHolder>" ; } count ( ) { long count = 0 ; while ( iterator . hasNext ( ) ) { iterator . nextLong ( ) ; count ++ ; } return count ; } | org . junit . Assert . assertEquals ( 100 , count ) |
testRecursive ( ) { com . gargoylesoftware . htmlunit . html . HtmlSubmitInput button = ( ( com . gargoylesoftware . htmlunit . html . HtmlSubmitInput ) ( page . getElementById ( "button" ) ) ) ; page = button . click ( ) ; text = page . asText ( ) ; first = text . indexOf ( "Dynamically" ) ; next = text . indexOf ( "D... | org . junit . Assert . assertTrue ( ( first < next ) ) |
testReplaceSubsetThenFetch ( ) { org . antlr . v4 . tool . LexerGrammar g = new org . antlr . v4 . tool . LexerGrammar ( ( "lexer<sp>grammar<sp>T;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; java . lang . String input = "abcccba" ; org . antlr . v4 . runtime . LexerInterpreter ... | org . junit . Assert . assertEquals ( expecting , result ) |
addressNullTest ( ) { org . marc . everest . datatypes . generic . SET < org . marc . everest . datatypes . AD > addrSet = org . oscarehr . e2e . model . export . header . RecordTargetModelTest . nullRecordTargetModel . getAddresses ( ) ; "<AssertPlaceHolder>" ; } getAddresses ( ) { return addresses ; } | org . junit . Assert . assertNull ( addrSet ) |
testGetWidget ( ) { com . agiletec . aps . system . services . user . UserDetails user = new org . entando . entando . web . utils . OAuth2TestUtils . UserBuilder ( "jack_bauer" , "0x24" ) . grantedToRoleAdmin ( ) . build ( ) ; java . lang . String accessToken = mockOAuthInterceptor ( user ) ; org . springframework . t... | org . junit . Assert . assertNotNull ( response ) |
test_monthsBetween ( java . time . LocalDate , java . time . LocalDate , long ) { "<AssertPlaceHolder>" ; } between ( java . time . temporal . Temporal , java . time . temporal . Temporal ) { if ( ( temporal1Inclusive . getClass ( ) ) != ( temporal2Exclusive . getClass ( ) ) ) { return temporal1Inclusive . until ( temp... | org . junit . Assert . assertEquals ( test . java . time . temporal . MONTHS . between ( start , end ) , expected ) |
testByteValue ( ) { final byte [ ] klvBytes = new byte [ ] { - 8 , 1 , - 128 } ; final org . codice . ddf . libs . klv . data . numerical . KlvByte klvByte = new org . codice . ddf . libs . klv . data . numerical . KlvByte ( new byte [ ] { - 8 } , "test" ) ; final org . codice . ddf . libs . klv . KlvContext decodedKlv... | org . junit . Assert . assertThat ( value , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( - 128 ) ) ) ) |
test_wstring_stream ( ) { java . lang . String testValue = "hello<sp>world" ; org . omg . CORBA . Any any = setup . getClientOrb ( ) . create_any ( ) ; any . type ( setup . getClientOrb ( ) . get_primitive_tc ( TCKind . tk_wstring ) ) ; any . create_output_stream ( ) . write_wstring ( testValue ) ; java . lang . String... | org . junit . Assert . assertEquals ( testValue , outValue ) |
testChainWithSystemMissingId ( ) { system . remove ( org . sagebionetworks . aws . AbstractSynapseCredentialProvider . ORG_SAGEBIONETWORKS_STACK_IAM_ID ) ; when ( mockPropertyProvider . getMavenSettingsProperties ( ) ) . thenReturn ( null ) ; when ( mockPropertyProvider . getSystemProperties ( ) ) . thenReturn ( system... | org . junit . Assert . assertNotNull ( creds ) |
UmlLinkType_Implements ( ) { java . lang . String fromClass = "Domain.Direct.Violating.InheritanceImplementsInterface" ; java . lang . String toClass = "Technology.Direct.Dao.IMapDAO" ; java . lang . String fromAttribute = "" ; boolean isComposite = false ; java . lang . String typeToFind = "Implements" ; "<AssertPlace... | org . junit . Assert . assertTrue ( isUmlLinkDetected ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) ) |
should_return_this ( ) { org . fest . assertions . api . IntegerAssert returned = assertions . isNotEqualTo ( expected ) ; "<AssertPlaceHolder>" ; } isNotEqualTo ( byte ) { bytes . assertNotEqualTo ( description , actual , expected ) ; return this ; } | org . junit . Assert . assertSame ( assertions , returned ) |
testRequestTooLong ( ) { com . mozilla . bagheera . http . ContentLengthFilter filter = new com . mozilla . bagheera . http . ContentLengthFilter ( 1 ) ; byte [ ] contentBytes = new java . lang . String ( "foo" ) . getBytes ( ) ; boolean success = false ; try { filter . messageReceived ( ctx , createMockEvent ( ctx . g... | org . junit . Assert . assertTrue ( success ) |
testDisplayProperty ( ) { java . util . Locale definedNameLocale = new java . util . Locale ( "en" , "US" ) ; org . openmrs . Concept concept = new org . openmrs . Concept ( ) ; org . openmrs . ConceptName fullySpecifiedName = new org . openmrs . ConceptName ( "some<sp>name" , definedNameLocale ) ; fullySpecifiedName .... | org . junit . Assert . assertEquals ( "some<sp>name" , result ) |
messageBodyWriterProviderReferenceTest ( ) { _consumerService . operation ( org . switchyard . component . resteasy . context . RESTEasyContextParamsTest . OP_CREATE_WITH_OWN_MEDIA_TYPE ) . sendInOut ( org . switchyard . component . resteasy . context . RESTEasyContextParamsTest . PAYLOAD ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( org . switchyard . component . resteasy . context . SyTxtMessageBodyRW . isInvoked ( ) ) |
getCountOfPatients_shouldCountPatientsByIdentifier_SignatureNo2 ( ) { long patientCount = dao . getCountOfPatients ( "42-42-42" ) ; "<AssertPlaceHolder>" ; } getCountOfPatients ( java . lang . String ) { return getCountOfPatients ( query , false ) ; } | org . junit . Assert . assertEquals ( 1 , patientCount ) |
testUpdateAnnotationsFromValuesEmptyScheam ( ) { org . sagebionetworks . repo . model . Annotations annos = new org . sagebionetworks . repo . model . Annotations ( ) ; java . util . Map < java . lang . String , java . lang . String > values = new java . util . HashMap ( ) ; boolean updated = org . sagebionetworks . re... | org . junit . Assert . assertFalse ( updated ) |
drop_last_element_java ( ) { java . lang . String [ ] lastElementRemoved = new java . lang . String [ ] { "one" , "two" , "three" } ; java . lang . String [ ] removedElement = java . util . Arrays . copyOf ( lastElementRemoved , 2 ) ; com . levelup . java . array . RemoveLastElementInArray . logger . info ( java . util... | org . junit . Assert . assertEquals ( 2 , removedElement . length ) |
testThresholdCrossedAscendingWithStep ( ) { org . rioproject . impl . watch . BoundedThresholdManager thresholdManager = new org . rioproject . impl . watch . BoundedThresholdManager ( "foo" ) ; org . rioproject . watch . ThresholdValues thresholdValues = new org . rioproject . watch . ThresholdValues ( 0 , 5 , 2 ) ; t... | org . junit . Assert . assertEquals ( 7 , listener . breached . size ( ) ) |
shouldPurgeAConceptDescription ( ) { int before = service . getConceptByUuid ( conceptUuid ) . getDescriptions ( ) . size ( ) ; handle ( newDeleteRequest ( ( ( ( getURI ( ) ) + "/" ) + ( getUuid ( ) ) ) , new org . openmrs . module . webservices . rest . web . v1_0 . controller . openmrs1_9 . Parameter ( "purge" , "" )... | org . junit . Assert . assertEquals ( ( before - 1 ) , after ) |
isNotEmptyIfKeySetContainsValuesRegardlessOfMDC ( ) { traceeKeys . get ( ) . add ( "A" ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return backendValues . isEmpty ( ) ; } | org . junit . Assert . assertThat ( unit . isEmpty ( ) , org . hamcrest . Matchers . is ( false ) ) |
testGo ( ) { org . jboss . weld . environment . se . Weld w = new org . jboss . weld . environment . se . Weld ( ) ; org . jboss . weld . environment . se . WeldContainer wc = w . initialize ( ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream ps = new java ... | org . junit . Assert . assertEquals ( expected , actual ) |
testFindBySpecialty ( ) { java . lang . String lName1 = "LastName1" ; java . lang . String lName2 = "LastName2" ; java . lang . String lName3 = "LastName3" ; java . lang . String specialty1 = "alpha" ; java . lang . String specialty2 = "bravo" ; org . oscarehr . common . model . ProfessionalSpecialist professionalSpeci... | org . junit . Assert . assertTrue ( true ) |
defaultValueOfOracleEscapingDisabledShouldBeFalse ( ) { java . lang . System . clearProperty ( SqoopOptions . ORACLE_ESCAPING_DISABLED ) ; org . apache . sqoop . SqoopOptions opts = new org . apache . sqoop . SqoopOptions ( ) ; "<AssertPlaceHolder>" ; } isOracleEscapingDisabled ( ) { return org . apache . sqoop . manag... | org . junit . Assert . assertThat ( opts . isOracleEscapingDisabled ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( true ) ) ) |
shouldExcecuteFromBeanMethodWorksWithWhereCondition ( ) { cn . jimmyshi . beanquery . example . Book book = new cn . jimmyshi . beanquery . example . Book ( ) ; book . setName ( "abc123" ) ; java . util . Map < java . lang . String , java . lang . Object > result = select ( "name,price" ) . where ( value ( "name" , sta... | org . junit . Assert . assertThat ( ( ( java . lang . String ) ( result . get ( "name" ) ) ) , is ( "abc123" ) ) |
testWeekDayMappingQuartzToCrontab ( ) { final com . cronutils . mapper . WeekDay quartz = ConstantsMapper . QUARTZ_WEEK_DAY ; final com . cronutils . mapper . WeekDay crontab = ConstantsMapper . CRONTAB_WEEK_DAY ; for ( int j = 1 ; j < 7 ; j ++ ) { "<AssertPlaceHolder>" ; } } weekDayMapping ( com . cronutils . mapper .... | org . junit . Assert . assertEquals ( ( j - 1L ) , com . cronutils . mapper . ConstantsMapper . weekDayMapping ( quartz , crontab , j ) ) |
privateFilterAccessModifierChangesFromPrivateToPublicVisible ( ) { org . jsoup . select . Elements divForClass = japicmp . test . output . xml . XmlHelper . getDivForClass ( japicmp . test . output . xml . XmlOutputGeneratorAccessModifierTest . documentPrivate , replaceLastDotWith$ ( AccessModifierLevel . AccessModifie... | org . junit . Assert . assertThat ( divForClass . isEmpty ( ) , org . hamcrest . core . Is . is ( false ) ) |
attrUnsupportedType ( ) { java . util . function . Function < java . lang . String , org . jooby . Route . Definition > route = ( path ) -> new org . jooby . Route . Definition ( "*" , path , ( ) -> null ) ; org . jooby . Route . Definition r = route . apply ( "/" ) ; r . attr ( "i" , new java . lang . Object ( ) ) ; "... | org . junit . Assert . assertNull ( r . attr ( "i" ) ) |
decode_5 ( ) { final java . lang . String arg = "foob" ; final java . lang . String exp = "Zm9vYg==" ; "<AssertPlaceHolder>" ; } decode ( byte [ ] ) { if ( ( data . length ) == 0 ) { return data ; } int lastRealDataIndex = ( data . length ) - 1 ; while ( ( data [ lastRealDataIndex ] ) == ( org . erlide . util . Base64 ... | org . junit . Assert . assertEquals ( arg , new java . lang . String ( org . erlide . util . Base64 . decode ( exp . getBytes ( ) ) ) ) |
testEventSinkWithKafka ( ) { java . util . Date startOfTest = new java . util . Date ( ) ; java . lang . String kafkaHost = org . opennms . smoketest . EventSinkIT . m_testEnvironment . getContainerInfo ( ContainerAlias . KAFKA ) . networkSettings ( ) . ipAddress ( ) ; kafkaHost = kafkaHost + ":9092" ; org . opennms . ... | org . junit . Assert . assertNotNull ( onmsNode ) |
appendString_throws ( ) { try { this . classUnderTest ( ) . appendString ( new java . lang . Appendable ( ) { public com . gs . collections . impl . lazy . parallel . Appendable append ( java . lang . CharSequence csq ) throws java . io . IOException { throw new java . io . IOException ( "Test<sp>exception" ) ; } publi... | org . junit . Assert . assertEquals ( "Test<sp>exception" , cause . getMessage ( ) ) |
testNoError ( ) { boolean result = checkNoError ( "Social_Search_REST_Tag_Search" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testBasic ( ) { org . talend . components . salesforce . tsalesforceoutputbulk . TSalesforceOutputBulkDefinition definition = ( ( org . talend . components . salesforce . tsalesforceoutputbulk . TSalesforceOutputBulkDefinition ) ( getComponentService ( ) . getComponentDefinition ( TSalesforceOutputBulkDefinition . COMP... | org . junit . Assert . assertArrayEquals ( expected , actual . toArray ( ) ) |
findAndProcessAcks ( ) { org . opennms . netmgt . ackd . AckReader reader = new org . opennms . netmgt . ackd . readers . DefaultAckReader ( ) ; java . util . concurrent . ScheduledThreadPoolExecutor executor = new java . util . concurrent . ScheduledThreadPoolExecutor ( 1 ) ; reader . setAckProcessor ( m_processor ) ;... | org . junit . Assert . assertTrue ( f . isDone ( ) ) |
testMaximumTimeMillisecondsDefault ( ) { final com . allanbank . mongodb . builder . Find . Builder b = com . allanbank . mongodb . builder . Find . builder ( ) ; final com . allanbank . mongodb . builder . Find command = b . build ( ) ; "<AssertPlaceHolder>" ; } getMaximumTimeMilliseconds ( ) { return myMaximumTimeMil... | org . junit . Assert . assertThat ( command . getMaximumTimeMilliseconds ( ) , org . hamcrest . Matchers . is ( 0L ) ) |
removeConfigurationWithNamespaceTest ( ) { final org . guvnor . structure . server . config . ConfigGroup config = configurationFactory . newConfigGroup ( ConfigType . REPOSITORY , "namespace" , "config" , "description" ) ; configurationService . addConfiguration ( config ) ; configurationService . removeConfiguration ... | org . junit . Assert . assertEquals ( 0 , configGroups . size ( ) ) |
testGetMgr ( ) { "<AssertPlaceHolder>" ; verify ( autosaveMgr , never ( ) ) . autosave ( ) ; } getMgr ( ) { return mgr ; } | org . junit . Assert . assertSame ( autosaveMgr , a . getMgr ( ) ) |
renderConfluencePage_asciiDocWithBr_returnsConfluencePageContentWithXhtml ( ) { java . lang . String adocContent = "a<sp>+\nb<sp>+\nc" ; org . sahli . asciidoc . confluence . publisher . converter . AsciidocConfluencePage asciidocConfluencePage = org . sahli . asciidoc . confluence . publisher . converter . AsciidocCon... | org . junit . Assert . assertThat ( asciidocConfluencePage . content ( ) , org . hamcrest . Matchers . is ( expectedContent ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.