Prevent errors in TryToCompleteTest

Note - tests still fail.
This commit is contained in:
tastybento 2021-09-23 17:12:59 -07:00
parent 7126acfcfa
commit 018455f8f6
1 changed files with 3 additions and 0 deletions

View File

@ -202,7 +202,10 @@ public class TryToCompleteTest {
// User has all perms by default
when(user.hasPermission(anyString())).thenReturn(true);
when(user.getPlayer()).thenReturn(player);
UUID uniqueId = UUID.randomUUID();
when(user.getUniqueId()).thenReturn(uniqueId);
when(user.getTranslation(Mockito.anyString())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));
when(user.getTranslationOrNothing(Mockito.anyString())).thenAnswer((Answer<String>) invocation -> invocation.getArgument(0, String.class));
when(user.getName()).thenReturn("tastybento");
@Nullable
Location userLoc = mock(Location.class);